Model-first + database initialization?


  • Hi!

    I've created an edmx entity-model with templates for generating DbContext entities (model-first).

    I now want to create runtime database initialization like we do when using code-first.

    I tried creating a database initializer, then setting Database.SetInitializer, but OnModelCreating is never reached. When trying to access the various entity sets and exception is complaining that its not mapped.

    So how do I achieve model-first + database-initialization?


    Wednesday, May 02, 2012 2:10 AM

All replies