示例#1
0
        public MemoryLeakTestMigrationsDbContext CreateDbContext(string[] args)
        {
            MemoryLeakTestEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

            var builder = new DbContextOptionsBuilder <MemoryLeakTestMigrationsDbContext>()
                          .UseNpgsql(configuration.GetConnectionString("Default"));

            return(new MemoryLeakTestMigrationsDbContext(builder.Options));
        }
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     MemoryLeakTestEfCoreEntityExtensionMappings.Configure();
 }