var Query2 = from x in CoreDatabase.Set<tblPerson>()
.Include(a => a.tblApplicationInterface.Select(b => b.tblApplicationName)
.Where(c => c.AppplicationName == "MshHumanResources"))
select x;
I get The Include path expression must refer to a navigation property defined on the type. Use dotted paths for reference navigation properties and the Select operator for collection navigation properties.
I am simply trying to write
Here something that works:
Select *
From tblPerson a INNER JOIN tblApplicationInterface b
on a.id = b.id
INNER Join tblApplicationName c
ON b.fkid=c.id
Where b.ApplicationName like 'MshHumanResources'
That’s not how
Includeworks. You want to usejoininstead:This is just selecting the columns from A – if you want to select columns from the other tables either create a class to combine the fields you need or use an anonymous type.