From 1c3b2ccc3149171968a47401726d0b24a720820a Mon Sep 17 00:00:00 2001 From: ajcvickers Date: Wed, 23 Apr 2014 13:51:15 -0700 Subject: [PATCH] IDDI again... (Remove call to WithServices) Per latest changes to EF DI/config. --- .../IdentityContext.cs | 12 ++---------- .../UserStoreTest.cs | 4 +--- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/Microsoft.AspNet.Identity.Entity/IdentityContext.cs b/src/Microsoft.AspNet.Identity.Entity/IdentityContext.cs index 4e37ea3bcc..3ce514569a 100644 --- a/src/Microsoft.AspNet.Identity.Entity/IdentityContext.cs +++ b/src/Microsoft.AspNet.Identity.Entity/IdentityContext.cs @@ -29,22 +29,14 @@ namespace Microsoft.AspNet.Identity.Entity public IdentityContext(IServiceProvider serviceProvider) : base(serviceProvider) { } - public IdentityContext() - : this(new ServiceCollection() - .AddEntityFramework( -//#if NET45 -// s => s.AddSqlServer() -//#else - s => s.AddInMemoryStore() -//#endif - ).BuildServiceProvider()) { } + public IdentityContext() { } protected override void OnConfiguring(EntityConfigurationBuilder builder) { //#if NET45 // builder.SqlServerConnectionString(@"Server=(localdb)\v11.0;Database=IdentityDb;Trusted_Connection=True;"); //#else - builder.UseInMemoryStore(persist: true); + builder.UseInMemoryStore(); //#endif } diff --git a/test/Microsoft.AspNet.Identity.Entity.Test/UserStoreTest.cs b/test/Microsoft.AspNet.Identity.Entity.Test/UserStoreTest.cs index 1ef3a2ed02..9ee418f41a 100644 --- a/test/Microsoft.AspNet.Identity.Entity.Test/UserStoreTest.cs +++ b/test/Microsoft.AspNet.Identity.Entity.Test/UserStoreTest.cs @@ -209,9 +209,7 @@ namespace Microsoft.AspNet.Identity.Entity.Test protected override void OnConfiguring(EntityConfigurationBuilder builder) { - builder - .WithServices(s => s.AddInMemoryStore()) - .UseInMemoryStore(persist: true); + builder.UseInMemoryStore(); } protected override void OnModelCreating(ModelBuilder builder)