This question is locked. New answers and comments are not allowed.
Hi,
When I add 'where' clause in the inner join linq query, it is throwing runtime- error.
Got to resolve many to many scenario -
1. User table
2. Organisation table
3. UserOrganisation table
LINQ query..
IEnumerable<UserForGridDisplay> userList = from user in m_scope.Extent<User>()
join userOrg in m_scope.Extent<UserOrganisation>() on user.UserID equals userOrg.UserID
join org in m_scope.Extent<Organisation>() on userOrg.OrganisationID equals org.OrganisationID
where org.OrganisationID == orgID //Problem here
select new UserForGridDisplay
{
Forename = user.UserForename,
OrganisationName = org.OrganisationName
};
Identifier '<>h__TransparentIdentifier4' is not a parameter or variable or field of 'ORM_ClassLibrary.User'. If '<>h__TransparentIdentifier4' is a property please add the FieldAlias or Storage attribute to it or declare it as a field's alias.
Error..
Any help if highly appreciated.
Many thanks.
M G