Join three tables?
-
i want to join 3 tables in LINQ here i have SQL-T statement im new to LINQ and want in LINQ SELECT Module.* FROM UserModule INNER JOIN [User] ON UserModule.UserID = [User].ID INNER JOIN Module ON UserModule.ModuleID = Module.ID WHERE ([User].ID = 2) i want this statement in LINQ also U anybody know any plugin genarate LINQ statement like Querydesigner in SQL server? B/rgs Anushka
-
i want to join 3 tables in LINQ here i have SQL-T statement im new to LINQ and want in LINQ SELECT Module.* FROM UserModule INNER JOIN [User] ON UserModule.UserID = [User].ID INNER JOIN Module ON UserModule.ModuleID = Module.ID WHERE ([User].ID = 2) i want this statement in LINQ also U anybody know any plugin genarate LINQ statement like Querydesigner in SQL server? B/rgs Anushka
whats the problem? use
from u in user
from um in usermodule
where um.userid == u.id
from m in module
where um.moduleId == m.ID
&& u.Id == 2
select m;Does it makes sense.. I have made this very simple.. and done it by hand. try it .. see if it works or not.:rose::rose:
Abhishek Sur My Latest Articles Basics on LINQ and Lambda Expressions
Create .NET Templates -
i want to join 3 tables in LINQ here i have SQL-T statement im new to LINQ and want in LINQ SELECT Module.* FROM UserModule INNER JOIN [User] ON UserModule.UserID = [User].ID INNER JOIN Module ON UserModule.ModuleID = Module.ID WHERE ([User].ID = 2) i want this statement in LINQ also U anybody know any plugin genarate LINQ statement like Querydesigner in SQL server? B/rgs Anushka
Not quite like the query designer in sql server but will help with designing linq queries. Visual LINQ Query Builder[^]