Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. LINQ
  4. Join three tables?

Join three tables?

Scheduled Pinned Locked Moved LINQ
csharpdatabasesql-serverlinqsysadmin
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ASysSolvers
    wrote on last edited by
    #1

    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

    A I 2 Replies Last reply
    0
    • A ASysSolvers

      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

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • A ASysSolvers

        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 Offline
        I Offline
        Ian McCaul
        wrote on last edited by
        #3

        Not quite like the query designer in sql server but will help with designing linq queries. Visual LINQ Query Builder[^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups