I like the Entity Framework Code First idea because I'm able to quickly prototype new projects, but at this time I am handling a database that already is available.
We've many databases with similar schema. Right now, when we start new projects, we have to copy the database to to a different server. How do i 'save' us from needing to do that step by hand?
I believe I've two options:
- Copy the Database as before and produce a ADO.Internet Entity Data Model using the Wizard
- Write the code first and map that towards the database schema, and let Code First create the database whether it does not exist.
It is possible to tool that performs this?
Jon Galloway has the solution on his blog.
I'm focusing on database context initializer that will inform website owner if model and db schema are from sync and can show what differs. This could by helpful for designers preferring to possess complete control both over code-first model and database schema. Take a look: