How to organize asp.net mvc project (using entity framework) and a corresponding database project?

Posted by Bernie on Stack Overflow See other posts from Stack Overflow or by Bernie
Published on 2010-06-13T11:59:42Z Indexed on 2010/06/13 12:02 UTC
Read the original article Hit count: 262

I recently switched to vs2010 and am experimenting with asp.net MVC2. I am building a simple website and use the entity framework to design the data model. From the .edmx file, I generate the database tables.

After a few iterations, I decided that it would be nice to have version control of the database schema as well, and therefore I added a database project into which I imported the script that is generated from the datamodel.

As a result, I have to generate the sql every time that I change the model and redo the import. The database project automatically updates the database. Although the manual steps to generate the sql and the import are annoying, this works pretty well, until I wanted to add the standard tables for user accounts/authorization etc.

I can use the framework tools to add the necessary tables, views etc. to the database, but as I do not want to have them in the .edmx model I end up with a third manual step.

Is anybody facing similar issues?

© Stack Overflow or respective owner

Related posts about entity-framework

Related posts about visual-studio-2010