public InMemoryEFUserStoreTestWithGenerics(InMemoryDatabaseFixture fixture)
        {
            _fixture = fixture;

            var services = new ServiceCollection();

            services.AddHttpContextAccessor();
            services.AddDbContext <InMemoryContextWithGenerics>(
                options => options
                .UseSqlite(_fixture.Connection)
                .ConfigureWarnings(b => b.Log(CoreEventId.ManyServiceProvidersCreatedWarning)));
            _context = services.BuildServiceProvider().GetRequiredService <InMemoryContextWithGenerics>();

            _context.Database.EnsureCreated();
        }
示例#2
0
 public InMemoryEFUserStoreTest(InMemoryDatabaseFixture fixture)
 {
     _fixture = fixture;
 }
 public InMemoryEFOnlyUsersTest(InMemoryDatabaseFixture fixture)
 {
     _fixture = fixture;
 }