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

            var configuration = BuildConfiguration();

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

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