Пример #1
0
        public CPAS2MigrationsDbContext CreateDbContext(string[] args)
        {
            CPAS2EfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

            var builder = new DbContextOptionsBuilder <CPAS2MigrationsDbContext>()
                          .UseSqlServer(configuration.GetConnectionString("Default"));

            return(new CPAS2MigrationsDbContext(builder.Options));
        }
Пример #2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     CPAS2EfCoreEntityExtensionMappings.Configure();
 }