Multiple tables are mapped to one object using Entity Framework.

entity-framework

Question

I have a database with two tables: one for live orders, the other for dormant ones. This is what I want to represent in Entity Framework as the Orders entity. Additionally, I need a mechanism to tell if an order in this collection is active or not, ideally by using the status property of the entity, which should be set in accordance with the table the entity is in. Is it possible to do this with Entity Framework 1? How does Entity Framework 4 compare?

1
7
11/20/2009 5:30:05 PM

Accepted Answer

Look at the inheritance of the Table Per Concrete Type.
The ADO.NET Team Blog gives here a description of it.

5
11/26/2009 2:46:49 PM

Popular Answer

In your database, you may build a view and use that to produce the object.



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow