Browse Source
Merge pull request #15208 from abpframework/AddDataMigrationEnvironment
`AddDataMigrationEnvironment` before `AddApplicationAsync`.
pull/15209/head
maliming
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
6 additions and
6 deletions
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/Program.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Program.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/Program.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Program.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/Program.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Program.cs
|
|
|
@ -35,11 +35,11 @@ public class Program |
|
|
|
builder.Host.AddAppSettingsSecretsJson() |
|
|
|
.UseAutofac() |
|
|
|
.UseSerilog(); |
|
|
|
await builder.AddApplicationAsync<MyProjectNameModule>(); |
|
|
|
if (IsMigrateDatabase(args)) |
|
|
|
{ |
|
|
|
builder.Services.AddDataMigrationEnvironment(); |
|
|
|
} |
|
|
|
await builder.AddApplicationAsync<MyProjectNameModule>(); |
|
|
|
var app = builder.Build(); |
|
|
|
await app.InitializeApplicationAsync(); |
|
|
|
|
|
|
|
|
|
|
|
@ -40,11 +40,11 @@ public class Program |
|
|
|
builder.Host.AddAppSettingsSecretsJson() |
|
|
|
.UseAutofac() |
|
|
|
.UseSerilog(); |
|
|
|
await builder.AddApplicationAsync<MyProjectNameModule>(); |
|
|
|
if (IsMigrateDatabase(args)) |
|
|
|
{ |
|
|
|
builder.Services.AddDataMigrationEnvironment(); |
|
|
|
} |
|
|
|
await builder.AddApplicationAsync<MyProjectNameModule>(); |
|
|
|
var app = builder.Build(); |
|
|
|
await app.InitializeApplicationAsync(); |
|
|
|
|
|
|
|
|
|
|
|
@ -35,11 +35,11 @@ public class Program |
|
|
|
builder.Host.AddAppSettingsSecretsJson() |
|
|
|
.UseAutofac() |
|
|
|
.UseSerilog(); |
|
|
|
await builder.AddApplicationAsync<MyProjectNameModule>(); |
|
|
|
if (IsMigrateDatabase(args)) |
|
|
|
{ |
|
|
|
builder.Services.AddDataMigrationEnvironment(); |
|
|
|
} |
|
|
|
await builder.AddApplicationAsync<MyProjectNameModule>(); |
|
|
|
var app = builder.Build(); |
|
|
|
await app.InitializeApplicationAsync(); |
|
|
|
|
|
|
|
|
|
|
|
@ -40,11 +40,11 @@ public class Program |
|
|
|
builder.Host.AddAppSettingsSecretsJson() |
|
|
|
.UseAutofac() |
|
|
|
.UseSerilog(); |
|
|
|
await builder.AddApplicationAsync<MyProjectNameModule>(); |
|
|
|
if (IsMigrateDatabase(args)) |
|
|
|
{ |
|
|
|
builder.Services.AddDataMigrationEnvironment(); |
|
|
|
} |
|
|
|
await builder.AddApplicationAsync<MyProjectNameModule>(); |
|
|
|
var app = builder.Build(); |
|
|
|
await app.InitializeApplicationAsync(); |
|
|
|
|
|
|
|
|
|
|
|
@ -35,11 +35,11 @@ public class Program |
|
|
|
builder.Host.AddAppSettingsSecretsJson() |
|
|
|
.UseAutofac() |
|
|
|
.UseSerilog(); |
|
|
|
await builder.AddApplicationAsync<MyProjectNameModule>(); |
|
|
|
if (IsMigrateDatabase(args)) |
|
|
|
{ |
|
|
|
builder.Services.AddDataMigrationEnvironment(); |
|
|
|
} |
|
|
|
await builder.AddApplicationAsync<MyProjectNameModule>(); |
|
|
|
var app = builder.Build(); |
|
|
|
await app.InitializeApplicationAsync(); |
|
|
|
|
|
|
|
|
|
|
|
@ -40,11 +40,11 @@ public class Program |
|
|
|
builder.Host.AddAppSettingsSecretsJson() |
|
|
|
.UseAutofac() |
|
|
|
.UseSerilog(); |
|
|
|
await builder.AddApplicationAsync<MyProjectNameModule>(); |
|
|
|
if (IsMigrateDatabase(args)) |
|
|
|
{ |
|
|
|
builder.Services.AddDataMigrationEnvironment(); |
|
|
|
} |
|
|
|
await builder.AddApplicationAsync<MyProjectNameModule>(); |
|
|
|
var app = builder.Build(); |
|
|
|
await app.InitializeApplicationAsync(); |
|
|
|
|
|
|
|
|