.net - Mapping TPT in EF Code First 4.1 w/ Different Primary Keys -



.net - Mapping TPT in EF Code First 4.1 w/ Different Primary Keys -

i trying map tpt inheritance hierarchy on legacy database (i can't alter column names). of examples have primary keys of parent , children tables same name. unfortunately, mine doesn't behave way.

as simplified example:

vehicle ---------------- vehicleid create model ---------------- auto ---------------- carid someotherfield ----------------

carid , vehicleid same id , values should used associate tables. there back upwards creating tpt relationship in code first?

here statement issue ef team:

unfortunately isn't possible @ stage. realize isn't great reply 1 alternative create view renames pk/fk column , map that.

it's feb 2011. related before ctp version of ef code-first. believe scenario still not supported in ef 4.1.

also similar question here not satisfying result regarding ef 4.1 code-first: how can utilize tpt inheritance models when primary keys have different names?

.net entity-framework entity-framework-4.1 ef-code-first

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -