Hi,
I have the following model and relationship:
Table: Granddad
GranddadID
GranddadName
Table: Father
FatherID
GranddadID
FatherName
Table: Son
SonID
FatherID
SonName
in the Granddad controller:
public ActionResult Edit(int tmpgranddadid)
{
var q = (from g in _e.Grandad
where g.GrandadID == tmpgranddadid
select g).FirstOrDefault();
string son_name = q.Father.Son.SonName.ToString(); // <- is wrong, how to do this?
return View(q);
}
How do you retrieve the value from a linked linked table?
Thank you