Hi all,
I am not able to serialize nested entities.
This is my transfer object
[ProtoContract]
[Serializable]
[DataContract]
public class MyClassTO
{
[ProtoMember(1)]
[DataMember]
public List<MyEntity> ListOfMyEntities {get;set;};
}
On my backend, I fire the following linq to entities query, fill the
transfer object and return it to the client:
var myClassTO = new MyClassTO();
myClassTO.ListOfMyEntities =
Context.MyEntity.Include("ReferencedEntity.AnotherReferencedEntity").ToList;
return myClassTO;
The client receives the list of MyEntity objects but included entities
are not serialized(they are all null). Does anybody have any idea
about it?
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en.