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)
44.AddEntityFrameworkStores<TestDbContext>(); 52services.AddSingleton((TestDbContext)context); 94protected virtual TestDbContext CreateContext() 98var db = DbUtil.Create<TestDbContext>(_fixture.Connection, services); 110services.AddSingleton<IUserStore<TUser>>(new UserStore<TUser, TRole, TestDbContext, TKey>((TestDbContext)context)); 115services.AddSingleton<IRoleStore<TRole>>(new RoleStore<TRole, TestDbContext, TKey>((TestDbContext)context)); 129internal static void VerifyDefaultSchema(TestDbContext dbContext) 222using (var db = CreateContext()) 241private async Task LazyLoadTestSetup(TestDbContext db, TUser user) 243var context = CreateContext(); 268var db = CreateContext(); 284var db = CreateContext(); 299var db = CreateContext(); 325var db = CreateContext();
UserStoreEncryptPersonalDataTest.cs (1)
31.AddEntityFrameworkStores<TestDbContext>()
UserStoreGuidKeyTest.cs (10)
34public class ApplicationUserStore : UserStore<GuidUser, GuidRole, TestDbContext, Guid> 36public ApplicationUserStore(TestDbContext context) : base(context) { } 39public class ApplicationRoleStore : RoleStore<GuidRole, TestDbContext, Guid> 41public ApplicationRoleStore(TestDbContext context) : base(context) { } 46services.AddSingleton<IUserStore<GuidUser>>(new ApplicationUserStore((TestDbContext)context)); 51services.AddSingleton<IRoleStore<GuidRole>>(new ApplicationRoleStore((TestDbContext)context)); 59.AddSingleton(new TestDbContext(new DbContextOptionsBuilder<TestDbContext>().Options)); 61var builder = services.AddIdentity<GuidUser, GuidRole>().AddEntityFrameworkStores<TestDbContext>(); 76.AddSingleton(new TestDbContext(new DbContextOptionsBuilder<TestDbContext>().Options)); 78var builder = services.AddIdentityCore<IdentityUser<Guid>>().AddRoles<IdentityRole<Guid>>().AddEntityFrameworkStores<TestDbContext>();
UserStoreIntKeyTest.cs (4)
37.AddSingleton(new TestDbContext(new DbContextOptionsBuilder<TestDbContext>().Options)); 39var builder = services.AddIdentity<IntUser, IntRole>().AddEntityFrameworkStores<TestDbContext>(); 54.AddSingleton(new TestDbContext(new DbContextOptionsBuilder<TestDbContext>().Options)); 56var builder = services.AddIdentityCore<IdentityUser<int>>().AddRoles<IdentityRole<int>>().AddEntityFrameworkStores<TestDbContext>();
UserStoreStringKeyTest.cs (4)
38.AddSingleton(new TestDbContext(new DbContextOptionsBuilder<TestDbContext>().Options)); 40var builder = services.AddIdentity<StringUser, StringRole>().AddEntityFrameworkStores<TestDbContext>(); 55.AddSingleton(new TestDbContext(new DbContextOptionsBuilder<TestDbContext>().Options)); 57var builder = services.AddIdentityCore<IdentityUser<string>>().AddRoles<IdentityRole<string>>().AddEntityFrameworkStores<TestDbContext>();