diff --git a/README.md b/README.md index cea80cc3..9cacb327 100644 --- a/README.md +++ b/README.md @@ -64,10 +64,8 @@ To use OpenIddict, you need to: public void ConfigureServices(IServiceCollection services) { services.AddMvc(); - services.AddEntityFramework() - .AddSqlServer() - .AddDbContext(options => - options.UseSqlServer(Configuration["Data:DefaultConnection:ConnectionString"])); + services.AddDbContext(options => + options.UseSqlServer(Configuration["Data:DefaultConnection:ConnectionString"])); // Register the Identity services. services.AddIdentity() diff --git a/samples/Mvc.Server/Startup.cs b/samples/Mvc.Server/Startup.cs index b0aef8ec..99936144 100644 --- a/samples/Mvc.Server/Startup.cs +++ b/samples/Mvc.Server/Startup.cs @@ -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(options => - options.UseSqlServer(configuration["Data:DefaultConnection:ConnectionString"])); + services.AddDbContext(options => + options.UseSqlServer(configuration["Data:DefaultConnection:ConnectionString"])); // Register the Identity services. services.AddIdentity>()