1.

How To Define A Service As Rest Based Service In Wcf?

Answer»

WCF 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);
}

WCF 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);
}



Discussion

No Comment Found