I want to join two entities in my MVC application for data Processing through the LINQ join.
For that I am trying to write the query like,
from enumeration in db.Enumerations
join cust in db.Customers on ( enumeration.Value equals cust.lkpStatus &&
enumeration.EnumerationTypeID.Contains('Cust')
But I am getting Problem with this Query, So please give me some suggestion on this.
Try this solution:
from enumeration in db.Enumerations.Where(e =>
e.EnumerationTypeID.Contains('Cust'))
join cust in db.Customers on enumeration.Value equals cust.lkpStatus
select enumeration;
Join should be made like this:
var joinQuery =
from t1 in Table1
join t2 in Table2
on new { t1.Column1, t1.Column2 } equals new { t2.Column1, t2.Column2 }
...