I am returning the xml output to the browser with a wcf webservice, if a property of a DataContract is null, it still comes through in the response as
<Id i:nil="true" />
Is there a way to have it not return in the response at all?
Figured it out myself, I needed to add the following atrribute to my DataMembers
[DataMember(EmitDefaultValue = false)]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With