1. Defined [DataContract] but forget [DataMember] in DTO .You will got return DTO with all member be null or 0;
if all  proprieties are datamember ,just need [Serializable],
but the fields name may be end with  'k__backingfield' if you generate class from service xml in client. 
to fix this, either add [DataMember] to classes, or use the classes in client side also.

2. DataMember use Enum type which first item value not 0,  and didn't initial  the value. it will cause serialize/deserialize issue.
for example,
public enum SessionLOB //Line Of Business
        UnDefined = 1, Auto = 4, InstantRenter = 5, StandardRenter = 32, HomeOwner = 37
    } ;
and with MyDTO has properties lob
public  SessionLOB lob { get; set; }

if the lob was not initialed and not be set a value, you will get null DTO, because it failed to deserialize 0 to SessionLOB 

Comments are closed.