6 instantiations of TestDbContext
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (6)
UserStoreGuidKeyTest.cs (2)
59
.AddSingleton(new
TestDbContext
(new DbContextOptionsBuilder<TestDbContext>().Options));
76
.AddSingleton(new
TestDbContext
(new DbContextOptionsBuilder<TestDbContext>().Options));
UserStoreIntKeyTest.cs (2)
37
.AddSingleton(new
TestDbContext
(new DbContextOptionsBuilder<TestDbContext>().Options));
54
.AddSingleton(new
TestDbContext
(new DbContextOptionsBuilder<TestDbContext>().Options));
UserStoreStringKeyTest.cs (2)
38
.AddSingleton(new
TestDbContext
(new DbContextOptionsBuilder<TestDbContext>().Options));
55
.AddSingleton(new
TestDbContext
(new DbContextOptionsBuilder<TestDbContext>().Options));
36 references to TestDbContext
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (36)
SqlStoreTestBase.cs (17)
43
.AddEntityFrameworkStores<
TestDbContext
>();
51
services.AddSingleton((
TestDbContext
)context);
93
protected virtual
TestDbContext
CreateContext()
97
var
db = DbUtil.Create<
TestDbContext
>(_fixture.Connection, services);
109
services.AddSingleton<IUserStore<TUser>>(new UserStore<TUser, TRole,
TestDbContext
, TKey>((
TestDbContext
)context));
114
services.AddSingleton<IRoleStore<TRole>>(new RoleStore<TRole,
TestDbContext
, TKey>((
TestDbContext
)context));
128
internal static void VerifyDefaultSchema(
TestDbContext
dbContext)
221
using (
var
db = CreateContext())
240
private async Task LazyLoadTestSetup(
TestDbContext
db, TUser user)
242
var
context = CreateContext();
267
var
db = CreateContext();
283
var
db = CreateContext();
298
var
db = CreateContext();
324
var
db = CreateContext();
UserStoreEncryptPersonalDataTest.cs (1)
30
.AddEntityFrameworkStores<
TestDbContext
>()
UserStoreGuidKeyTest.cs (10)
34
public class ApplicationUserStore : UserStore<GuidUser, GuidRole,
TestDbContext
, Guid>
36
public ApplicationUserStore(
TestDbContext
context) : base(context) { }
39
public class ApplicationRoleStore : RoleStore<GuidRole,
TestDbContext
, Guid>
41
public ApplicationRoleStore(
TestDbContext
context) : base(context) { }
46
services.AddSingleton<IUserStore<GuidUser>>(new ApplicationUserStore((
TestDbContext
)context));
51
services.AddSingleton<IRoleStore<GuidRole>>(new ApplicationRoleStore((
TestDbContext
)context));
59
.AddSingleton(new TestDbContext(new DbContextOptionsBuilder<
TestDbContext
>().Options));
61
var builder = services.AddIdentity<GuidUser, GuidRole>().AddEntityFrameworkStores<
TestDbContext
>();
76
.AddSingleton(new TestDbContext(new DbContextOptionsBuilder<
TestDbContext
>().Options));
78
var builder = services.AddIdentityCore<IdentityUser<Guid>>().AddRoles<IdentityRole<Guid>>().AddEntityFrameworkStores<
TestDbContext
>();
UserStoreIntKeyTest.cs (4)
37
.AddSingleton(new TestDbContext(new DbContextOptionsBuilder<
TestDbContext
>().Options));
39
var builder = services.AddIdentity<IntUser, IntRole>().AddEntityFrameworkStores<
TestDbContext
>();
54
.AddSingleton(new TestDbContext(new DbContextOptionsBuilder<
TestDbContext
>().Options));
56
var builder = services.AddIdentityCore<IdentityUser<int>>().AddRoles<IdentityRole<int>>().AddEntityFrameworkStores<
TestDbContext
>();
UserStoreStringKeyTest.cs (4)
38
.AddSingleton(new TestDbContext(new DbContextOptionsBuilder<
TestDbContext
>().Options));
40
var builder = services.AddIdentity<StringUser, StringRole>().AddEntityFrameworkStores<
TestDbContext
>();
55
.AddSingleton(new TestDbContext(new DbContextOptionsBuilder<
TestDbContext
>().Options));
57
var builder = services.AddIdentityCore<IdentityUser<string>>().AddRoles<IdentityRole<string>>().AddEntityFrameworkStores<
TestDbContext
>();