Forcing code-first to always initialize a non-existent database?
Initializer is executed when you need to access the database so if you want to create database on app start use anything of the following: context.Database.Initialize(true); //If set to true the initializer is run even if it has already been run. context.Database.Create() http://msdn.microsoft.com/en-us/library/system.data.entity.database.initialize(v=vs.103).aspx CreateDatabaseIfNotExists An implementation of IDatabaseInitializer that will recreate and optionally re-seed the … Read more