diff --git a/src/Microsoft.AspNet.Identity.Entity/IdentityContext.cs b/src/Microsoft.AspNet.Identity.Entity/IdentityContext.cs index 3ce514569a..9f51787353 100644 --- a/src/Microsoft.AspNet.Identity.Entity/IdentityContext.cs +++ b/src/Microsoft.AspNet.Identity.Entity/IdentityContext.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Identity.Entity public IdentityContext(IServiceProvider serviceProvider) : base(serviceProvider) { } } - public class IdentityContext : EntityContext + public class IdentityContext : DbContext where TUser : EntityUser where TRole : EntityRole /*, TUserRole*/ where TUserLogin : IdentityUserLogin @@ -23,8 +23,8 @@ namespace Microsoft.AspNet.Identity.Entity where TKey : IEquatable { - public EntitySet Users { get; set; } - public EntitySet Roles { get; set; } + public DbSet Users { get; set; } + public DbSet Roles { get; set; } public IdentityContext(IServiceProvider serviceProvider) : base(serviceProvider) { } diff --git a/src/Microsoft.AspNet.Identity.Entity/RoleStore.cs b/src/Microsoft.AspNet.Identity.Entity/RoleStore.cs index fc8fc5139d..9c450afd29 100644 --- a/src/Microsoft.AspNet.Identity.Entity/RoleStore.cs +++ b/src/Microsoft.AspNet.Identity.Entity/RoleStore.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Identity.Entity { private bool _disposed; - public RoleStore(EntityContext context) + public RoleStore(DbContext context) { if (context == null) { @@ -24,7 +24,7 @@ namespace Microsoft.AspNet.Identity.Entity AutoSaveChanges = true; } - public EntityContext Context { get; private set; } + public DbContext Context { get; private set; } /// /// If true will call SaveChanges after CreateAsync/UpdateAsync/DeleteAsync diff --git a/src/Microsoft.AspNet.Identity.Entity/UserStore.cs b/src/Microsoft.AspNet.Identity.Entity/UserStore.cs index e01693cdc6..3992d3e683 100644 --- a/src/Microsoft.AspNet.Identity.Entity/UserStore.cs +++ b/src/Microsoft.AspNet.Identity.Entity/UserStore.cs @@ -13,12 +13,12 @@ namespace Microsoft.AspNet.Identity.Entity public class UserStore : UserStore { - public UserStore(EntityContext context) : base(context) { } + public UserStore(DbContext context) : base(context) { } } public class UserStore : UserStore where TUser:EntityUser { - public UserStore(EntityContext context) : base(context) { } + public UserStore(DbContext context) : base(context) { } } public class UserStore : @@ -41,7 +41,7 @@ namespace Microsoft.AspNet.Identity.Entity { private bool _disposed; - public UserStore(EntityContext context) + public UserStore(DbContext context) { if (context == null) { @@ -51,7 +51,7 @@ namespace Microsoft.AspNet.Identity.Entity AutoSaveChanges = true; } - public EntityContext Context { get; private set; } + public DbContext Context { get; private set; } /// /// If true will call SaveChanges after CreateAsync/UpdateAsync/DeleteAsync diff --git a/test/Microsoft.AspNet.Identity.Entity.Test/TestIdentityFactory.cs b/test/Microsoft.AspNet.Identity.Entity.Test/TestIdentityFactory.cs index 2849cf9806..92c5bfd1c5 100644 --- a/test/Microsoft.AspNet.Identity.Entity.Test/TestIdentityFactory.cs +++ b/test/Microsoft.AspNet.Identity.Entity.Test/TestIdentityFactory.cs @@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Identity.Entity.Test { public static class TestIdentityFactory { - public static EntityContext CreateContext() + public static DbContext CreateContext() { var serviceProvider = new ServiceCollection() .AddEntityFramework(s => s.AddInMemoryStore()) @@ -79,7 +79,7 @@ namespace Microsoft.AspNet.Identity.Entity.Test } - public static UserManager CreateManager(EntityContext context) + public static UserManager CreateManager(DbContext context) { var manager = new UserManager(new UserStore(context)) { @@ -94,7 +94,7 @@ namespace Microsoft.AspNet.Identity.Entity.Test return CreateManager(CreateContext()); } - public static RoleManager CreateRoleManager(EntityContext context) + public static RoleManager CreateRoleManager(DbContext context) { return new RoleManager(new RoleStore(context)); } diff --git a/test/Microsoft.AspNet.Identity.Entity.Test/UserStoreTest.cs b/test/Microsoft.AspNet.Identity.Entity.Test/UserStoreTest.cs index 679391ecc8..96c7bfa802 100644 --- a/test/Microsoft.AspNet.Identity.Entity.Test/UserStoreTest.cs +++ b/test/Microsoft.AspNet.Identity.Entity.Test/UserStoreTest.cs @@ -203,9 +203,9 @@ namespace Microsoft.AspNet.Identity.Entity.Test } } - private class SimpleContext : EntityContext + private class SimpleContext : DbContext { - public EntitySet Artists { get; set; } + public DbSet Artists { get; set; } protected override void OnConfiguring(EntityConfigurationBuilder builder) {