Exemple #1
0
        public CodeGenOutputMigrationsDbContext CreateDbContext(string[] args)
        {
            CodeGenOutputEfCoreEntityExtensionMappings.Configure();

            var configuration = BuildConfiguration();

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

            return(new CodeGenOutputMigrationsDbContext(builder.Options));
        }
Exemple #2
0
 public override void PreConfigureServices(ServiceConfigurationContext context)
 {
     CodeGenOutputEfCoreEntityExtensionMappings.Configure();
 }