Tuesday, March 25, 2014

DataContract vs Serializable WCF

When applied to a class Serializable attribute serializes everything inside of it including private fields thus the developer has no control as what to expose.

When DataContract attribute is applied to a class it will serialize only the elements decorated with DataMember attribute thus the developer will have more control.

Related Posts:

  • ServiceContract Name property WCFThis property can give your contract a name which is different from the actual interface name. So this way if you decide to change the interface name of a already running WCF service your client wont break. Ex:  [Servi… Read More
  • Basic Elements of WCF Appconfig All config items should be inside , <system.serviceModel> This is the WCF namespace provided by Microsoft. Inside the <system.serviceModel> element you have the <services> element. This is where… Read More
  • An unsecured or incorrectly fault error WCFI encountered this error while executing the following snippet, factory.CreateChannel().Issue(rst)       // Here the rst is a RequestSecurityToken object and             … Read More
  • DataContract vs Serializable WCFWhen applied to a class Serializable attribute serializes everything inside of it including private fields thus the developer has no control as what to expose. When DataContract attribute is applied to a class it will serial… Read More

0 comments:

Post a Comment