In this article i am explaining how to use JOIN method in Entity Framework. Below is very simple and easy example.

var query = db.Employee        // source
   .Join(db.Salary,         // target
      c => c.EmployeeID,          // FK
      cm => cm.EmployeeID,   // PK
      (em, sal) => new { Employee = em, Salary = sal }) // project result
   .Select(x => x.Employee);  // select result

One response on “Join Query using Entity FrameWork

Leave a Reply

Your email address will not be published. Required fields are marked *