Serializing EntitySet - WCF, C #, VS2008

I asked about this before and followed Mark's advice. It didn't work for me.

link text

My client object is what I want to serialize, but with the Employee entity set, with any serialization, I get my object serialized without referencing my EntitySets.

Has anyone successfully serialized such objects?

+1


a source to share


1 answer


Based on the information in the link, it looks like you are trying to serialize an IQueryable object.

I don't think it is possible, it loses its meaning when it goes out of scope of the db connection. What happens when you go through the WCF host.

What you can do is dump data using ToArray to your IQueryable object. This result will be serialized over WCF.



Hope it helps

Shiraz

0


a source







All Articles