I have following query in my code:
var query3 = (from b in context.SystemDetails.Include("UserHousing").Include("UserInfo") where (b.UserHousing.UserInfo.FullName.StartsWith("Far")) select b).ToList();
Why does it give error that systemDeail do not have navigation property "UserInfo" .. it should not matter as UserHousing Have that Navigation property...
You should specify the correct path to UserInfo
:
context.SystemDetails.Include("UserHousing.UserInfo")
Or
context.SystemDetails.Include(x => x.UserHousing.UserInfo)