table-per-type

Unable to save Entity Framework Inherited types.

I have implemented some table-per-type inheritance in my data model (basically have a "BaseEntity" type with all the base information for my items and a "Employer" type that inherits from the "BaseEntity" item). Everything appears to be set up correctly and when using the Entities (either via ADO.net Data Services or via Linq to Entitie...

Linq to Entities, Table per Type and Nullable Foreign Key Relationships.

Hey, 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 Table (Inherits from Child Table) Linking Table (Has Foreign Key Nullable, to Child Table) Here is the database diagram Following the...

Inheritance problems with Entity Framework (table per type)

For part of the project I'm currently working on, I have a set of four tables for syndicatable actions. One table is the abstract base for the other three, and each table is represented in my EF model like so: There are two problems that I'm currently facing with this, however. The first problem is that Actor (a reference to a User) a...

Error when trying to filter on a property of an entity inheriting from another in Entity Framework

When I have entity B inherit from entity A using table-per-type for storage and try to write a Linq query that filters on a property on B, for example Function(b) b.name="Joe" I get the error The specified type member 'name' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation proper...

Cast to a property reference to a subclass in Entity framework (TPT)

Hello, I've got the following scheme: (not really the code, just to get the idea) class Person; class Employee : Person; class Company { public Person ContactPerson { ...} public EntityReference<ContactPerson> ContactPersonReference {....} } Employee type got it's own table in the database (Table-per-Type inheritance). Lets...

How can I add inheritance to an object defined in an EntityDataModel (EF 4)?

I have a simple 2 object inheritance defined in an EF model, Person <- User. Person is the base entity/class, it is not abstract, and it contains fields like firstname, lastname, email. User is the derived entity/class, and contains fields like username, lastlogin, islockedout. The database uses a table-per-type schema, so there is ...

EF4 TPT insert inherited table

Supposing my Application consumes two tables represented as two entities: Person and Employee. And: I am not allowed to make changes in table person. (I suggest get data from a view) Employee must inherit from Person. I am trying to implement Table-Per-Type inheritance, but I don't know how to insert rows in table Employee. Employ...