I\'m trying to create a new database using the code first concept of Entity Framework. However when running the code the database isn\'t created (using the DropCreateD
So First Remove the Db Name from the constructor parameter on context class and provide Db_name on the connection string and then try to rebuild your solution and run the application it will create Database for you application.
For Example :
I am not passing the Db-Name on constructor parameter
public EmployeeContext()
: base()
{
Database.SetInitializer(new DropCreateDatabaseIfModelChanges());
}
and on the Connection string I am passing the Db-name like below.