I'm relatively new to Entity Framework.
I created a database with two tables: Accounts
and Assignments
.
Accounts
has an AccountId
primary key which is used as a foreign key in the Properties
table. I really like that the Entity Framework automatically picks up the foreign key relationship and allows me to access rows in Assignments
as a property of each row from Accounts
.
I went ahead and created a new View object that returns all the columns from Accounts
along with some other information. However, when I get the data from the View in SQL using the Entity Framework, it is no longer automagically referencing the associated rows in the Assignments
table.
How can I get the desired behavior using Views with Entity Framework