コード例 #1
0
        public CarParkABPMigrationsDbContext CreateDbContext(string[] args)
        {
            CarParkABPEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

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