February 2018
Intermediate to advanced
668 pages
15h 18m
English
Let's dive into the code:
dotnet new web -n AspNetCoreIdentitySample dotnet restore
public void ConfigureServices(IServiceCollection services)
{
services.AddDbContext<ApplicationDbContext>(options => options.UseSqlServer("Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=AspNetCoreIdentitySample;Data Source=."));
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
services.AddMvc();
}