entity framework - Table-per-type inheritance with EF 4.1 Fluent Code First -
i have 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 you'd expect: vehicle being abstract class, , car , bike being subclasses of it. i have setup ef4.1 code first configuration follows: class vehicleconfiguration : entitytypeconfiguration<vehicle> { public vehicleconfiguration() { totable("vehicles"); property(x => x.id); property(x => x.regno); haskey(x => x.id); } } class carconfiguration : entitytypeconfiguration<car> { public carconfiguration() { totable("cars"); property(x => x.otherstuff); } } class bikeconfiguration : entitytypeconfiguration<bike> { public bikeconfiguration() { totable("bikes"); property(x => x.morestuff); } } however getting numerous strange exceptions when ef tried build ...