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

            var configuration = BuildConfiguration();

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

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