When you create a new project with EF6, I wonder if you notice that the default connection string uses LOCALDB instead of SQL Server. But if you want to switch the default connection to SQL Server instead of LOCALDB. This is really simple: just modify the next configuration file (app. Config or Web. config)
Configuration of the default LocalDB
<EntityFramework><Defaultconnectionfactorytype= "System.Data.Entity.Infrastructure.LocalDbConnectionFactory, entityframework"><Parameters><parametervalue= "v11.0" /></Parameters></defaultconnectionfactory></EntityFramework>
Modify to SQL Server
<EntityFramework><defaultconnectionfactorytype= "System.Data.Entity.Infrastructure.SqlConnectionFactory, entityframework"><Parameters><parametervalue= "Data source=.; Integrated security=true; Multipleactiveresultsets=true " /></Parameters></defaultconnectionfactory></EntityFramework>
Next, configure the connection string for SQL Server in connectionstrings.
Done!
Modify the default connection factory for EF to SQL Server instead of LocalDB