Beispiel #1
0
        public BaseServiceMigrationDbContext CreateDbContext(string[] args)
        {
            BaseEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new BaseServiceMigrationDbContext(builder.Options));
        }
Beispiel #2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     BaseEfCoreEntityExtensionMappings.Configure();
 }