If you want to use ASP.NET Identity with Entity Framework in your application, you need to add the following dependencies:
"EntityFramework.Commands": "7.0.0-rc1-final", "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final", "Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final",
Create an appsettings.json
file and store the database connection string.
Create a file with the name appsettings.json
at the root level of the project, as shown in the following screenshot:
Store the following connection string in appsettings.json
. This connection string will be used by ASP.NET Identity to store the data in relevant tables:
{ "Data": { "DefaultConnection": { "ConnectionString": "Server=(localdb)\\mssqllocaldb;Database=aspnet_security;Trusted_Connection=True;MultipleActiveResultSets=true" } } }