c# - How to prevent fields from being dropped after an EDMX update -
c# - How to prevent fields from being dropped after an EDMX update -
i have ef 5.0 database first model based on oracle 11g database, shown below:
baseentity (abstract) id
basehistoricalentity (abstract) entityid createdate deletedate
titleentity titlenumber isdraft registrydate lastmodified lastmodifiedby titlestatusid buildtypeid okvedid deliverydate titlebuildcharacteristics titletypeid basepriceid kosgu
all entities have primary key (id
). hence derived baseentity.
the title table has additional 3 fields basehistoricalentity entity.
entityid createdate deletedate
the title table maps 3 derived entities follows:
baseentity->basehistoricalentity->titleentity
when add/remove fields to/from other tables in database , update edmx model, next field defenition removed edmx file:
<scalarproperty name="entityid" columnname="entity_id" /> <scalarproperty name="createdate" columnname="create_date" /> <scalarproperty name="deletedate" columnname="delete_date" />
what should save these fields after database change?
from here: https://entityframework.codeplex.com/workitem/2351 ef team triage: design (albeit arguably bad design). update model database functionality built merge changes model created, if start editing model (adding inheritance etc.) wizard not able merge changes. there lot of issues update model database , have ideas how re-create in way much more robust. unfortunately fixing current implementation not feasible.
c# entity-framework code-generation edmx ef-database-first
Comments
Post a Comment