这是我的代码3个表:如何加入使用LINQ语法
// Put together a list of new communities
var communityList = from x in db.CommunityTeams
join y in db.Communities on x.CommunityId equals y.CommunityId
join z in db.CommunityRoles on x.CommunityRole equals z.Role
where x.UserId == userId
select new
{
CommunityName = y.ComunityName,
CommunityRoleName = z.Role
};
在db.CommunityRoles的加入z为给我这个错误:
在不正确的加入条款。我如何获得正确的语法?
给你什么错误? –
请显示您的模型结构和您收到的错误。 – CodingYoshi
我得到的错误是“Join子句不正确” –