'Get information from the parent table in an existing query
I have DB with some table in SQL, and I import them to ASP.NET with edmx model.
The main table called "Banks", with some child tables, and I do this query:
banks = db.Banks
.Include (s => s.Contact)
.Include (s => s.Branch)
.Include (s => s.AdditionalInfo) .Include (s => s.AdditionalInfo.Select (se => se.Details))
.ToList ();
But, for the "Branch" table I have a parent table (that named "Company", connected by id of "company"), and I would like to get the information from there, also within this query and not in different query. How can I do that? The query here does not recognize the "Company" table.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
