From 038649a062f7f794054daa77a36f10f4c6e16fad Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Thu, 28 Dec 2023 00:46:10 +0800 Subject: [PATCH] Fix `DbMigratorHostedService` --- .../DynamicEntitySample.DbMigrator/DbMigratorHostedService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sample/aspnet-core/src/DynamicEntitySample.DbMigrator/DbMigratorHostedService.cs b/sample/aspnet-core/src/DynamicEntitySample.DbMigrator/DbMigratorHostedService.cs index 5e238d8..dc68606 100644 --- a/sample/aspnet-core/src/DynamicEntitySample.DbMigrator/DbMigratorHostedService.cs +++ b/sample/aspnet-core/src/DynamicEntitySample.DbMigrator/DbMigratorHostedService.cs @@ -6,6 +6,7 @@ using DynamicEntitySample.Data; using Serilog; using Volo.Abp; +using Volo.Abp.Data; namespace DynamicEntitySample.DbMigrator { @@ -27,6 +28,7 @@ public async Task StartAsync(CancellationToken cancellationToken) options.Services.ReplaceConfiguration(_configuration); options.UseAutofac(); options.Services.AddLogging(c => c.AddSerilog()); + options.AddDataMigrationEnvironment(); })) { await application.InitializeAsync();