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,766 views
1,630 views

Published on

WCF Data Contracts - Kolkata NET UG Presentation

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,766
On SlideShare
0
From Embeds
0
Number of Embeds
18
Actions
Shares
0
Downloads
39
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

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 />

×