[DataMember] Attribute in WCF

The [DataMember] attribute is applied to all members of the data contract type to identify it as a data member. Specifying this attribute identifies that member as member whose data will be serialized by the DataContractSerializer. Just like the [DataContract] attribute, the [DataMember] attribute has a number of parameters to… Continue reading

[DataContract] Attribute in WCF

Data contracts are defined declaratively just like service contracts and operation contracts. To define a data contract, you simply decorate a class or enumeration with the [DataContract] attribute. [DataContract] public class BuyStock { … } I should back up and say that there is one difference between defining a service… Continue reading

[OperationContract] Attribute in WCF

The [OperationContract] attribute includes the method as part of the service contract and identifies the method as a service operation. A method marked as an operation contract is exposed to the public. Methods not marked with this attribute are not exposed externally. [OperationContract] attributes are also mapped to an equivalent… Continue reading

[ServiceContract] Attribute in WCF

The [ServiceContract] attribute identifies an interface or class as a service contract. This attribute explicitly defines the interface as a CLR interface and enables it to carry out WCF contract operations, with each [ServiceContract] attribute being mapped to an equivalent WDL portType declaration. The following list contains the parameters available… Continue reading

Service Contracts in WCF

A service contract defines the operations, or methods, that are available on the service endpoint and is exposed to the outside world. It also defines the basic message exchange patterns, such as whether the message behaves in a request/reply, one-way, or duplex behavior. A service contract exposes specific information to… Continue reading

MsmqIntegrationBinding in WCF

The MsmqIntegrationBinding differs from the NetMsmqBinding in that the MsmqIntegrationBinding provides direct integration between Windows Communication Foundation and MSMQ. With NetMsmqBinding, MSMQ is the transport and communicates with other WCF applications, whereas with MsmqIntegrationBinding your WCF application communicates directly with an MSMQ deployment. The benefit here is that your MSMQ… Continue reading