From 81822b8ebe29bee8f8d09ce943a82134ba38958c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 25 Oct 2021 08:52:47 +0300 Subject: [PATCH] Revised the 5.0 migration guide --- docs/en/Migration-Guides/Abp-5-0-MVC.md | 7 ++++ docs/en/Migration-Guides/Abp-5_0.md | 56 +++++++++++++++++-------- 2 files changed, 46 insertions(+), 17 deletions(-) create mode 100644 docs/en/Migration-Guides/Abp-5-0-MVC.md diff --git a/docs/en/Migration-Guides/Abp-5-0-MVC.md b/docs/en/Migration-Guides/Abp-5-0-MVC.md new file mode 100644 index 0000000000..a1ca8ed7fd --- /dev/null +++ b/docs/en/Migration-Guides/Abp-5-0-MVC.md @@ -0,0 +1,7 @@ +# ABP MVC / Razor Pages UI v4.x to v5.0 Migration Guide + +This document is for the ABP MVC / Razor Pages UI. See also [the main migration guide](Abp-5_0.md). + +## Use install-libs by default + +Removed the Gulp dependency from the MVC / Razor Pages UI projects in favor of `abp install-libs` command ([see](https://docs.abp.io/en/abp/5.0/UI/AspNetCore/Client-Side-Package-Management#install-libs-command)) of the ABP CLI. You should run this command whenever you change/upgrade your client-side package dependencies via `package.json`. \ No newline at end of file diff --git a/docs/en/Migration-Guides/Abp-5_0.md b/docs/en/Migration-Guides/Abp-5_0.md index 2dc880be3b..a4f89f5039 100644 --- a/docs/en/Migration-Guides/Abp-5_0.md +++ b/docs/en/Migration-Guides/Abp-5_0.md @@ -1,6 +1,42 @@ # ABP Framework v4.x to v5.0 Migration Guide -## IdentityUser +This document is a guide for upgrading ABP 4.x solutions to ABP 5.0. Please read them all since 5.0 has some important breaking changes. + +## .NET 6.0 + +ABP 5.0 runs on .NET 6.0. So, please upgrade your solution to .NET 6.0 if you want to use ABP 5.0. You can see [Microsoft's migration guide](https://docs.microsoft.com/en-us/aspnet/core/migration/50-to-60). + +## Bootstrap 5 + +ABP 5.0 uses the Bootstrap 5 as the fundamental HTML/CSS framework. We've migrated all the UI themes, tag helpers, UI components and the pages of the pre-built application modules. You may need to update your own pages by following the [Bootstrap's migration guide](https://getbootstrap.com/docs/5.0/migration/). + +## ABP Framework + +This section contains breaking changes in the ABP Framework. + +### MongoDB + +ABP Framework will serialize the datetime based on [AbpClockOptions](https://docs.abp.io/en/abp/latest/Timing#clock-options) starting from ABP v5.0. It was saving `DateTime` values as UTC in MongoDB. Check out [MongoDB Datetime Serialization Options](https://mongodb.github.io/mongo-csharp-driver/2.13/reference/bson/mapping/#datetime-serialization-options). + +If you want to revert back this feature, set `UseAbpClockHandleDateTime = false` in `AbpMongoDbOptions`: + +```cs +services.Configure(x => x.UseAbpClockHandleDateTime = false); +``` + +### Removed Obsolete APIs + +* `IRepository` doesn't inherit from `IQueryable` anymore. It was [made obsolete in 4.2](https://docs.abp.io/en/abp/latest/Migration-Guides/Abp-4_2#irepository-getqueryableasync). + +## UI Providers + +* [Angular UI 4.x to 5.0 Migration Guide](Abp-5_0-Angular.md) + +## Modules + +This section contains breaking and important changes in the application modules. + +### Identity `IsActive ` property is added to the `IdentityUser`. This flag will be checked during the authentication of the users. See the related [PR](https://github.com/abpframework/abp/pull/10185). **After the migration, set this property to `true` for the existing users: `UPDATE AbpUsers SET IsActive=1`** @@ -31,21 +67,7 @@ public partial class AddIsActiveToIdentityUser : Migration ``` For document base databases like MongoDB, you need to manually update the `IsActive` field for the existing user records. - -## MongoDB - -ABP Framework will serialize the datetime based on [AbpClockOptions](https://docs.abp.io/en/abp/latest/Timing#clock-options) starting from ABP v5.0. It was saving `DateTime` values as UTC in MongoDB. Check out [MongoDB Datetime Serialization Options](https://mongodb.github.io/mongo-csharp-driver/2.13/reference/bson/mapping/#datetime-serialization-options). - -To revert back this feature, set `UseAbpClockHandleDateTime = false` in `AbpMongoDbOptions`: - -```cs -services.Configure(x => x.UseAbpClockHandleDateTime = false); -``` - -## IApiScopeRepository - -`GetByNameAsync` method renamed as `FindByNameAsync`. -## Angular UI +### IdentityServer -See the [Angular UI 5.0 Migration Guide](Abp-5_0-Angular.md). +`IApiScopeRepository.GetByNameAsync` method renamed as `FindByNameAsync`.