In the code below all of the fields are returned from the tables except for fields that are foreign keys. How do I get the foreign key fields to display? I just want an equivalent to select * from tableName.
public ActionResult ShowAllTables()
{
var model = new CSLA_StagingModel()
{
depots = db.CSLA_DEPOT.Where(c => c.DEPOT_ID == 10065).ToList<CSLA_DEPOT>(),
addresses = db.CSLA_ADDRESS.Where(a => a.CSLA_DEPOT.DEPOT_ID == 10065).ToList<CSLA_ADDRESS>(),
};
return View(model);
}
note: I'm using vs2008
EDIT: I think I might use Linq to SQL until I get VS2010