views:

151

answers:

1

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?

+2  A: 

Figured it out myself, I needed to add the following atrribute to my DataMembers

[DataMember(EmitDefaultValue = false)]
Nick Allen - Tungle139