none
Modular code-first and the Database Initializer? RRS feed

  • Question

  • We have a modular application in which different modules have their own DbContext but we'd like them all to share the same database.  I would really like to provide the capability of new modules to be added without requiring manual modification of the database (i.e. add a new module and it adds what it needs to the database).  However, obviously when a module attempts to run with an existing database and a different DbContext, I get "The model backing the '{DbContextName}' context has changed since the database was created...."  The problem is similar to the one referenced in http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/2d090f46-0d65-4f0c-bd23-ea60ee6dc45c, but I need a solution that doesn't require manually changing the database.  Is this simply impossible?  Any thoughts or ideas?

    Thanks!

    Brad.

    Wednesday, September 21, 2011 4:08 PM

All replies