Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
WCF Data Transfer & SerializationPart1: Data Contracts<br />Sankarsan Bose<br />2nd November 2009<br />
Agenda<br /><ul><li> Data Transfer In Service
 Serializers in WCF
 Data Contracts
 Known Types
 Serializing Collections</li></li></ul><li>Data Transfer In Service<br />Serialize<br />Deserialize<br />Client <br />   H...
Serializers In WCF<br />
Data Contract<br />Will this class be properly serialized in WCF by DataContractSerializer ??<br />public sealed class Dat...
Data Contract<br />Default Serialization ; No fine grained control<br />
Data Contract<br />Custom Namespace<br />Serialized XML<br />
Data Contract <br />Data Contract Properties<br />
Data Contract <br />Demo<br />
Data Member<br />Data Member Properties<br />
Data Member<br />Demo<br />
Known Type<br />Base Type is used method signature<br />Here Serializer needs additional data about the concrete class<br ...
Known Type<br />Demo<br />
Upcoming SlideShare
Loading in …5
×

WCF Data Contracts

1,843 views

Published on

WCF Data Contracts - Kolkata NET UG Presentation

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

WCF Data Contracts

  1. 1. WCF Data Transfer & SerializationPart1: Data Contracts<br />Sankarsan Bose<br />2nd November 2009<br />
  2. 2. Agenda<br /><ul><li> Data Transfer In Service
  3. 3. Serializers in WCF
  4. 4. Data Contracts
  5. 5. Known Types
  6. 6. Serializing Collections</li></li></ul><li>Data Transfer In Service<br />Serialize<br />Deserialize<br />Client <br /> Host Process<br />Proxy<br />Service<br />Deserialize<br />Serialize<br />
  7. 7. Serializers In WCF<br />
  8. 8. Data Contract<br />Will this class be properly serialized in WCF by DataContractSerializer ??<br />public sealed class DataContractSerializer : XmlObjectSerializer<br />DataContractAttribute is not mandatory<br />
  9. 9. Data Contract<br />Default Serialization ; No fine grained control<br />
  10. 10. Data Contract<br />Custom Namespace<br />Serialized XML<br />
  11. 11. Data Contract <br />Data Contract Properties<br />
  12. 12. Data Contract <br />Demo<br />
  13. 13. Data Member<br />Data Member Properties<br />
  14. 14. Data Member<br />Demo<br />
  15. 15. Known Type<br />Base Type is used method signature<br />Here Serializer needs additional data about the concrete class<br />This is done by KnownType attribute<br />
  16. 16. Known Type<br />Demo<br />
  17. 17. Serializing Collections<br />
  18. 18. Serializing Collections<br />Demo<br />
  19. 19. Thank You<br />

×