linq2sql and multiple joins
Posted
by zerkms
on Stack Overflow
See other posts from Stack Overflow
or by zerkms
Published on 2010-04-28T01:53:25Z
Indexed on
2010/04/28
2:03 UTC
Read the original article
Hit count: 349
is it possible to do multiple joins:
from g in dataContext.Groups
join ug in dataContext.UsersGroups on g.Id equals ug.GroupId
join u in dataContext.Users on u.
where ug.UserId == user.Id
select GroupRepository.ToEntity(g);
in the sample above all is fine until i press "." in the end of the 3rd line. there i expect to get intellisense and write u.Id == ug.UserId
but it doesn't appear. and of course this code doesn't compile after.
what did i wrong?
© Stack Overflow or respective owner