I'm trying to convert this SQL query to LINQ but the most I can get is joining the tables. After that I can't figure out the syntax for the WHERE part or how to return it as a list (ToList()).
var groups = db.ENG_Hazmanifest.SqlQuery("SELECT ENG_Hazmanifest.*,
ENG_Locations.sitenumb FROM ENG_Hazmanifest INNER JOIN ENG_Locations ON
ENG_Hazmanifest.site = ENG_Locations.id WHERE ENG_Hazmanifest.display = '1'
ORDER BY ENG_Hazmanifest.pudate").ToList();
As far as I've gotten is:
var groups = from ENG_Hazmanifest in db.ENG_Hazmanifest
join ENG_Locations in db.ENGI_Locations
on ENG_Hazmanifest.site equals ENG_Locations.id
What do I need to add to this to?