Adnan Latif
Adnan Latif

Reputation: 77

Exclude DataMembers from DataContract wcf

I have a WCF service Method returning region object containing list of countries and in country class i have also a region object can i remove this region object from WCF data contact

Upvotes: 3

Views: 1360

Answers (1)

Mikael Östberg
Mikael Östberg

Reputation: 17156

How about the IgnoreDataMemberAttribute attribute?

When applied to the member of a type, specifies that the member is not part of a data contract and is not serialized.

Upvotes: 6

Related Questions