How do I tell EF what to name the database and where to put it?
If there is no connection string in the Web.Config, it tries to put it in the local SQLEXPRESS Server
in Class :
public class Context : DbContext
{
//SET CONNECTION STRING NAME FOR DataBase Name :
public Context() : base("YourConnectionName") { }
public DbSet Categories { get; set; }
public DbSet Products { get; set; }
}
in web.config:
Thanks ferventcoder.
Ref => http://brandonclapp.com/connection-strings-with-entity-framework-5-code-first/