From 00c7bddeb9a3dd7cf6c0da1759711f3edbe45cf7 Mon Sep 17 00:00:00 2001 From: maliming Date: Sun, 29 Jan 2023 18:37:09 +0800 Subject: [PATCH] Add `Data migration environment` guide. --- docs/en/Migration-Guides/Abp-7_0.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/en/Migration-Guides/Abp-7_0.md b/docs/en/Migration-Guides/Abp-7_0.md index 05dc276e3d..65a1614603 100644 --- a/docs/en/Migration-Guides/Abp-7_0.md +++ b/docs/en/Migration-Guides/Abp-7_0.md @@ -110,6 +110,31 @@ See https://github.com/abpframework/abp/pull/13845 for more info. > You can ignore this if you don't use CMS Kit Module. +## Data migration environment + +Please call `AddDataMigrationEnvironment` method in the migration project. + +```cs +using (var application = await AbpApplicationFactory.CreateAsync(options => +{ + //... + options.AddDataMigrationEnvironment(); +})) +{ + //... +} +``` + +```cs +var builder = WebApplication.CreateBuilder(args); +builder.Services.AddDataMigrationEnvironment(); +// Call AddDataMigrationEnvironment before AddApplicationAsync +await builder.AddApplicationAsync(); +//... +``` + +See https://github.com/abpframework/abp/pull/13985 for more info. + ## Devart.Data.Oracle.EFCore The `Devart.Data.Oracle.EFCore` package do not yet support EF Core 7.0, If you use `AbpEntityFrameworkCoreOracleDevartModule(Volo.Abp.EntityFrameworkCore.Oracle.Devart)` may not work as expected, We will release new packages as soon as they are updated.