Browse Source

Fix `DbMigratorHostedService`

pull/277/head
gdlcf88 2 years ago
parent
commit
6dda9a4f2e
  1. 2
      samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/DbMigratorHostedService.cs

2
samples/EShopSample/aspnet-core/src/EShopSample.DbMigrator/DbMigratorHostedService.cs

@ -6,6 +6,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
using Volo.Abp;
using Volo.Abp.Data;
namespace EShopSample.DbMigrator;
@ -27,6 +28,7 @@ public class DbMigratorHostedService : IHostedService
options.Services.ReplaceConfiguration(_configuration);
options.UseAutofac();
options.Services.AddLogging(c => c.AddSerilog());
options.AddDataMigrationEnvironment();
}))
{
await application.InitializeAsync();

Loading…
Cancel
Save