From 5838c24a85681a3d92f1b003b47b46cf6dfebb66 Mon Sep 17 00:00:00 2001 From: Orlando Quero Date: Mon, 4 Jul 2016 13:01:47 -0400 Subject: [PATCH] Update README.md and the Mvc.Server sample to use the new Entity Framework context registration syntax --- README.md | 6 ++---- samples/Mvc.Server/Startup.cs | 7 ++----- 2 files changed, 4 insertions(+), 9 deletions(-) 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>()