I have child data in a view being displayed using a partial view:
foreach (var item in Model)
{ ... }
I need to display some fields from the parent table for each row, and even though I have a relation to that parent table it is always NULL in this partial view.
In the controller, I have a EF query that looks like this:
var query =
from sr in db.Child
from lb in db.Parent
where sr.ParentId == lb.id
orderby sr.dDate descending
select sr;
return query.ToList();
I would have thought that I could of reached the "parent" table via this query in my partial view.
I trust I am clear (-;
TIA
Go to the complete details ...