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();