Map Entity To Multiple Tables

Map Entity To Multiple Tables

Postby MichaelH » Wed 29 Feb 2012 23:18

Is there a way to map an entity (Code First) using attributes to multiple tables?
Posts: 6
Joined: Tue 22 Nov 2011 20:57

Postby MariiaI » Fri 02 Mar 2012 14:15

Please specify which ORM you are using. Am I correct supposing that this is LinqConnect?

As for mapping several tables to a single entity, please specify whether you mean mapping all rows to a single entity type (like it is done when joining tables) or loading the same or similar rows from multiple tables (like 'union' does). In the first case, it is only possible with the means of the TPT inheritance:
- specify the base type for the first table;
- determine a new descendant class for each additional table;
- in your code work only with the last descendant.
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Return to dotConnect for PostgreSQL