Reacting to EF changes
This commit is contained in:
parent
5fba08562f
commit
c068128098
|
|
@ -35,10 +35,7 @@
|
|||
"web": "IdentitySample.Mvc"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": {
|
||||
"frameworkAssemblies": {
|
||||
"System.Reflection": ""
|
||||
}
|
||||
"net451": {
|
||||
},
|
||||
"netstandardapp1.5": {
|
||||
"imports": [
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test
|
|||
public async Task CanCreateRoleWithSingletonManager()
|
||||
{
|
||||
var services = TestIdentityFactory.CreateTestServices();
|
||||
services.AddAddEntityFrameworkInMemoryDatabase();
|
||||
services.AddTransient<InMemoryContext>();
|
||||
services.AddEntityFrameworkInMemoryDatabase();
|
||||
services.AddSingleton(new InMemoryContext(new DbContextOptionsBuilder().Options));
|
||||
services.AddTransient<IRoleStore<IdentityRole>, RoleStore<IdentityRole, InMemoryContext>>();
|
||||
services.AddSingleton<RoleManager<IdentityRole>>();
|
||||
var provider = services.BuildServiceProvider();
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http.Internal;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test
|
||||
|
|
@ -14,7 +13,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.InMemory.Test
|
|||
public static InMemoryContext CreateContext()
|
||||
{
|
||||
var services = new ServiceCollection();
|
||||
services.AddAddEntityFrameworkInMemoryDatabase();
|
||||
services.AddEntityFrameworkInMemoryDatabase();
|
||||
var serviceProvider = services.BuildServiceProvider();
|
||||
|
||||
var db = new InMemoryContext(new DbContextOptionsBuilder().Options);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test
|
|||
|
||||
services
|
||||
.AddDbContext<IdentityDbContext>(o => o.UseSqlServer(fixture.ConnectionString))
|
||||
.ServiceCollection()
|
||||
.AddIdentity<IdentityUser, IdentityRole>()
|
||||
.AddEntityFrameworkStores<IdentityDbContext>();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue