table-per-type Questions

5

I'm using a 'table-per-type' hierarchy in my code-first project (EF5). My derived classes override the default primary-key name to clearly identify this relationship from a database point of view, ...
Gregarine asked 4/9, 2013 at 12:52

2

So I'm trying to use Code First with Fluent to map a base class with one derived type where the tables schema is a Table-per-Type arrangement. Also, the derived type has a many-to-one relationship ...

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

2

Solved

I am using EF Code First and have two classes defined as follows: public class User { public int Id { get; set; } public string Username { get; set; } public string Email { get; set; } } [Tabl...
Phenothiazine asked 11/10, 2012 at 15:53

0

We have a small base class with four derived classes. The derived classes are quite big (~75 properties each, some of them resulting from ComplexTypes as well). Still: performance should be ok, at...
Sumrall asked 27/1, 2014 at 15:46

2

I have a pretty straight forward set of database tables, like: Vehicle Id RegNo Car Id (FK of Vehicle.Id) OtherStuff Bike Id (FK of Vehicle.Id) MoreStuff My class model is as you'd expec...

1

I have a simple hierarchy public abstract class CommunicationSupport { public SupportTypeEnum Type { get; set; } public Country Origin { get; set; } // National or Foreign support } public clas...
Harder asked 7/8, 2013 at 10:21

3

Solved

I am having problems to create an Entity Framework Code-First mapping for the following sample database schema (in SQL Server): Every table contains a TenantId which is part of all (composite) p...

1

We are using EF 4.3 Code first and have an object model like so: class Content { } class Product:Content { } class News:Content { } These are mapped as Table per Type. There are scenarios wh...
Leukocyte asked 17/7, 2012 at 1:58

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...

2

So it turns out that I am the last person to discover the fundamental floor that exists in Microsoft's Entity Framework when implementing TPT (Table Per Type) inheritance. Having built a prototype...
Xenogenesis asked 9/1, 2011 at 23:3

1

Solved

I'm using Linq to entities applying a Table per Type approach. This has been going very well, up to now. I have the following setup: Parent Table Child Table (Inherits from parent) Grand Child Ta...
Proboscidean asked 3/12, 2008 at 11:46
1

© 2022 - 2024 — McMap. All rights reserved.