public DevExpressSampleMigrationsDbContext CreateDbContext(string[] args)
        {
            DevExpressSampleEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

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