table-per-hierarchy Questions

4

I'm using Table Per Hierarchy database inheritance where columns for all derived types are in a single table. Each derived table is identified using a string Discriminator field that holds the name...
Philtre asked 26/3, 2015 at 1:11

1

Solved

I'm moving from EF Core 2.2 to 3.1. One breaking change (#15392) was that it no longer composed over stored procedures, so you had to add 'AsEnumerable'. That usually works, but I have a stored pro...
Twentyone asked 7/4, 2020 at 0:22

4

I have a Garage which contains Cars and Motorcycles. Cars and motorcycles are Vehicles. Here they are: public class Garage { public int Id { get; set; } public virtual List<Car> Cars { get...
Gerrilee asked 2/1, 2014 at 21:56

3

I am working with a legacy system that implements a TPH for a certain number of items. So the current structure looks like this Abstract Class 1 Abstract Class 2 Abstract Class 3 | | | --------...
Figurine asked 1/8, 2015 at 18:44

1

Solved

EF 6.1 : We just started a project that has a lot pf inheritance. The selected inheritance db mapping type is the table per hierarchy. The problem is that when trying to generate the migration usi...

1

Solved

As of EF6 it is possible to do something like this when configuring Entity mappings using Table Per Hierarchy inheritance: public class MyContext : DbContext { public DbSet<Device> Devices...
Inhalant asked 24/10, 2013 at 21:56

3

Solved

I am trying to understand the inheritance mappings in EF4. My database has two tables with the following structure: PersonCategory Table: CategoryID (int) (identity) (PK) CategoryType (nvarcha...

1

I have 4 classes A, B, B1, B2 with inheritance mapping described as below: A (mapped to table A) is the top-most parent class and its inheritance mapping strategy is tablePerHierarchy=false (means ...
Directorate asked 11/8, 2011 at 9:52

1

Solved

First of all, these questions are similar but definitely not the same: Can I mix Table per Hierarchy and Table per Type in Entity Framework? - Refers to a different scenario. Entity Framework: mi...

1

Solved

I currently have a Entity Framework 4.0 model in place with Table Per Type (TPT), but there are a few performance issues (lots of LOJ's/CASE statements), as well as an issue mapping between two par...
1

© 2022 - 2024 — McMap. All rights reserved.