Friday, February 11, 2011

CRUD in RESTful Services of WCF-Tutorial

http://www.codegain.com/articles/wcf/restservice/crud-in-restful-services-of-wcf-tutorial.aspx

using System.Collections.Generic;


[WebGet(UriTemplate = "contacts")]
    [OperationContract]
    List GetAllContacts();

It is possible to return from an soap ASMX a generic collection
List of Contacts instead of a DataSet of Contacts ?



Note : The notion of building UriTemplate is to specify some form of unique Uri.
Always keep in mind, the external world will request the service using the URI.
Now lets go to our ServiceHost application and configure the service to use REST based approach.
Basically for REST based service you need to use webHttpBinding as Binding configuration.

No comments:

Post a Comment