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>(); 51services.AddSingleton((TestDbContext)context); 93protected virtual TestDbContext CreateContext() 97var db = DbUtil.Create<TestDbContext>(_fixture.Connection, services); 109services.AddSingleton<IUserStore<TUser>>(new UserStore<TUser, TRole, TestDbContext, TKey>((TestDbContext)context)); 114services.AddSingleton<IRoleStore<TRole>>(new RoleStore<TRole, TestDbContext, TKey>((TestDbContext)context)); 128internal static void VerifyDefaultSchema(TestDbContext dbContext) 221using (var db = CreateContext()) 240private async Task LazyLoadTestSetup(TestDbContext db, TUser user) 242var context = CreateContext(); 267var db = CreateContext(); 283var db = CreateContext(); 298var db = CreateContext(); 324var db = CreateContext();
UserStoreEncryptPersonalDataTest.cs (1)
30.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>();