這是我的代碼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子句不正確」 –