Implementation of IDatabaseInitializer
that is used in EntityFramework by default. As the name implies, it creates the database if none exists.
However when you change the model, it throws an exception.
Usage:
public class MyContext : DbContext {
public MyContext() {
Database.SetInitializer(new CreateDatabaseIfNotExists<MyContext>());
}
}