I have a table "Users" mapped with linq as "User" and a table "Groups" mapped to "Group".
Groups has a many-to-many with Users and with itself.
When I try to return the linq object explicitely like this:
Code: Select all
User result = context.Users.Where(u => u.Id == 1);
return user;
If I try to return a simple string in my service it works.
Is there a problem returning a linq object this way?
Since this worked for EF I think this should work too.
EDIT: I also read about setting Serialization Mode=Unidirectional but when I set it the code generated is checking for a bool property "serializing" which doesn't exists in my User class.