Entity Framework 4 - TPH Inheritance in Features CTP5 (code first) with “IS NULL” discriminator
问题 Hey guys, I'm trying to create a TPH mapping on a hierarchy where the discriminating clause is the classical "IS NOT NULL" / "IS NULL" case. Here is the example, database wise: CREATE TABLE info.EducationTypes ( ID INT NOT NULL PRIMARY KEY, Name NVARCHAR(64) NOT NULL, FKParentID INT NULL REFERENCES info.EducationTypes(ID) ) the idea is to have a class hierarchy like the following one: public abstract class EducationType { public int ID { get; set; } public string Name { get; set; } } public