I’m just beginning in Entity Framework and Linq To Entities and am trying to get my head around querying.
I have a data structure as follows:
Tables A, B, C.
A has one to many relationship to B, B has one to many relationship to C.
One of our presentation objects is composed of data from A, B & C given the Id from C
So, how can I represent this in a query?
How do I get an A entity from a where c.Id == myParam query?
What about:
Where
Bis navigation property onCto instance ofBanAis navigation property fromBto instance ofA.You can also use lambda notation if System.Data.Entity namespace is refeneced:
And for Collection navigation properties you can use .Select()