WCF beginner’s guide

November 30, 2009 – 6:06 pm

1. Create a WCF Service Library project
2. Create an entity object class .cs.
3. Annotate entity class with [DataContract] attribute.
4. Annotate fields (from class above) you want in the contract with [DataMember] attribute.
5. Next, create a IService.cs interface that has the operations that can be performed.
6. Annotate with [ServiceContract] attribute.
7. Annotate methods with [OperationContract] attribute.
8. Create Service.cs class to hold the actual implementation of the interface above.
9. Annotate with [ServiceBehaviour] attribute.

Your Ad Here

Post a Comment