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

            var configuration = BuildConfiguration();

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

            return(new PaymentServiceSampleMigrationsDbContext(builder.Options));
        }
コード例 #2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     PaymentServiceSampleEfCoreEntityExtensionMappings.Configure();
 }