Joins and Group By using in LINQ to Entities

Joins and Group By using in LINQ to Entities

Entity Model Name  :

TestLinqDataContext db = new TestLinqDataContext();
var result = (from p in db.TagMasters
join
t in db.TagRegistrations on p.ID equals t.TagId
group t by new { p.TagCode, t.DateCreated } into g
select new { g.Key.TagCode,g.Key.DateCreated}).Distinct();

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply