I am using entity framework and in my context inheriting from DbContext.
public class MyContext : DbContext, IMyContext
{
static MyContext()
{
The default database initializer in Entity Framework Code First is CreateDatabaseIfNotExists. As its name indicates, if the database does not exist it'll create it.
This behavior is good during development but when you go to production maybe you won't want to auto create your database.
If you want to disable the initializers you use the line you showed, so now you have full control over how the database will be created and evolve in time.
Other initializers:
DropCreateDatabaseIfModelChanges.
DropCreateDatabaseAlways
Custom DB Initializer
Check this to know more.