Try this
context.Database.CreateIfNotExists();
You could do something like this in your context constructor
public YourDBContext(): base("YourDBConnectionString")
{
Database.SetInitializer<YourDBContext>(new CreateDatabaseIfNotExists<YourDBContext>());
//Database.SetInitializer<YourDBContext>(new DropCreateDatabaseIfModelChanges<YourDBContext>());
}
This will use your connection string in the web.config
file and try to find the database. If the database doesn't exist then it will create it according to the model that you defined.
Update :
Please look at this answer too