Can you explain how to define a service as REST based service in WCF?
Submitted by: AdministratorWCF 3.5 provides explicit support for RESTful communication using a new binding named WebHttpBinding.
The below code shows how to expose a RESTful service
[ServiceContract]
interface IStock
{
[OperationContract]
[WebGet]
int GetStock(string StockId);
}
By adding the WebGetAttribute, we can define a service as REST based service that can be accessible using HTTP GET operation.
Submitted by: Administrator
The below code shows how to expose a RESTful service
[ServiceContract]
interface IStock
{
[OperationContract]
[WebGet]
int GetStock(string StockId);
}
By adding the WebGetAttribute, we can define a service as REST based service that can be accessible using HTTP GET operation.
Submitted by: Administrator
Read Online WCF Data Services Job Interview Questions And Answers
Top WCF Data Services Questions
☺ | Tell me what is Proxy and how to generate proxy for WCF Services? |
☺ | Explain what is the difference WCF and Web services? |
☺ | Explain what are the main components of WCF? |
☺ | Explain WCF IPC binding type? |
☺ | Explain what is Transport and Message Reliability? |
Top Dot Net Technologies Categories
☺ | MSF Interview Questions. |
☺ | .Net Architecture Interview Questions. |
☺ | ASP.Net MVC Interview Questions. |
☺ | Entity Framework Interview Questions. |
☺ | C# (Sharp) Programming Language Interview Questions. |