C# - LINQ Including headache...

Posted by ebb on Stack Overflow See other posts from Stack Overflow or by ebb
Published on 2011-01-15T21:51:19Z Indexed on 2011/01/15 21:53 UTC
Read the original article Hit count: 162

Filed under:
|

Case can have many Replies and one User, Replies can have one Case and one User, One User can have many Replies and many Cases.

ObjectSet <= Case Object (IDbSet)

ObjectSet.Include(x => x.User).Include(x => x.Replies).FirstOrDefault(x => x.Id == caseId);

But the User Object for each Reply are not included? Only the User object for Case is Included?

How would I include the User objects for the Replies too?

Thanks in advance!

© Stack Overflow or respective owner

Related posts about c#

Related posts about LINQ