Microsoft SQL Server Express LocalDB should be used in place of the SQL Server Express user instance feature which is deprecated. It is more suitable for developers as it runs on-demand (instead as a service) with your Windows credential and without the need the need of complex configurations.
In Visual Studio 2013, if you want to have it setup a default database using a SQL Server LocalDb in your Web.Config
, make sure you choose Individual User Account as your authentication mode.
Then you can modify the parameters and commit Update-Database
later.
<configuration> <configSections> <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> </configSections> <connectionStrings> <add name="DefaultConnection" connectionString="Data Source=(LocalDb)v11.0;AttachDbFilename=|DataDirectory|aspnet-WebApplication1-20131218041336.mdf;Initial Catalog=aspnet-WebApplication1-20131218041336;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings> <appSettings> ...
Further Reading
SQL Server 2012 Express LocalDB
Introducing LocalDB, an improved SQL Express
Leave a Reply