|
|
|
@ -4,7 +4,6 @@ using CryptoHelper; |
|
|
|
using Microsoft.AspNetCore.Builder; |
|
|
|
using Microsoft.AspNetCore.Identity.EntityFrameworkCore; |
|
|
|
using Microsoft.EntityFrameworkCore; |
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure; |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Mvc.Server.Models; |
|
|
|
@ -24,10 +23,8 @@ namespace Mvc.Server { |
|
|
|
|
|
|
|
services.AddSession(); |
|
|
|
|
|
|
|
services.AddEntityFramework() |
|
|
|
.AddEntityFrameworkSqlServer() |
|
|
|
.AddDbContext<ApplicationDbContext>(options => |
|
|
|
options.UseSqlServer(configuration["Data:DefaultConnection:ConnectionString"])); |
|
|
|
services.AddDbContext<ApplicationDbContext>(options => |
|
|
|
options.UseSqlServer(configuration["Data:DefaultConnection:ConnectionString"])); |
|
|
|
|
|
|
|
// Register the Identity services.
|
|
|
|
services.AddIdentity<ApplicationUser, IdentityRole<Guid>>() |
|
|
|
|