EF 6, update model from database does not support object context?

Viewed 1632

We have a fairly elaborate data model built from an existing database, then enhanced using partial classes to support additional methods & properties, inheritance, etc. We have not yet bitten the bullet to update this from ObjectContext to DbContext.

I am using VS2012, .net 4.5, EF 6.0.2, and have installed the EF 6.0.2 Tools for VS2012.

Following the recommended mechanism to update a project to EF6 (http://msdn.microsoft.com/en-us/data/dn469466) has been successful, including the addition of the EF 6 Entity Object generator as the code generation item.

Subsequent to making this change, I would like to update the model from the database to incorporate some recent schema changes into the model. Running through the "update model from database" dialog, what appears to be happening is that an entirely new dbcontext-based model & template is added to the project, in addition to the object context-based model that already exists in the project, and none of the changes are incorporated into the entity-object template.

Of course, this means there are hundreds of duplicate names defined in the project once the operation completes. The edmx properties do not appear to have an option that would control this behavior.

Certainly, making the transition to dbcontext is the right avenue ultimately, but would like to avoid taking that on imminently.

1 Answers
Related