From 47014a8d3a3049d9d41f6bcf766dbe99e7d4fa88 Mon Sep 17 00:00:00 2001 From: maliming <6908465+maliming@users.noreply.github.com> Date: Fri, 18 Sep 2020 20:43:24 +0800 Subject: [PATCH 1/3] Fix case problem in routing. Fix #5485 --- .../Volo/Abp/Identity/IdentityUserController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs index 1281135526e..c02ea23e9f6 100644 --- a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs +++ b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity/IdentityUserController.cs @@ -75,9 +75,9 @@ public virtual Task UpdateRolesAsync(Guid id, IdentityUserUpdateRolesDto input) [HttpGet] [Route("by-username/{userName}")] - public virtual Task FindByUsernameAsync(string username) + public virtual Task FindByUsernameAsync(string userName) { - return UserAppService.FindByUsernameAsync(username); + return UserAppService.FindByUsernameAsync(userName); } [HttpGet] From e33298827f1ec47f9e4e68c51744740d3f4cb587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 21 Sep 2020 10:16:25 +0300 Subject: [PATCH 2/3] Update for 3.2 --- .../2020-09-17 v3_2_Preview/POST.md | 42 ++++++++++++++----- docs/en/Getting-Started.md | 4 +- docs/en/MongoDB.md | 4 +- 3 files changed, 37 insertions(+), 13 deletions(-) diff --git a/docs/en/Blog-Posts/2020-09-17 v3_2_Preview/POST.md b/docs/en/Blog-Posts/2020-09-17 v3_2_Preview/POST.md index 1ef8f22492a..0b7d7bfd73e 100644 --- a/docs/en/Blog-Posts/2020-09-17 v3_2_Preview/POST.md +++ b/docs/en/Blog-Posts/2020-09-17 v3_2_Preview/POST.md @@ -1,6 +1,6 @@ # ABP Framework 3.2 RC with the new Blazor UI -We are extremely excited today to release the [ABP Framework](https://abp.io/) (and the [ABP Commercial](https://commercial.abp.io/), as always) version `3.2.0-rc.1` (Release Candidate). This release includes an early preview version of the **Blazor UI** for the ABP.IO Platform. +We are extremely excited today to release the [ABP Framework](https://abp.io/) Release Candidate (and the [ABP Commercial](https://commercial.abp.io/), as always). This release includes an early preview version of the **Blazor UI** for the ABP.IO Platform. ## The Blazor UI @@ -36,7 +36,7 @@ We also have a good news: **[Mladen Macanović](https://github.com/stsrki)**, th ### The Tutorial -We are currently in progress of updating the [web application development tutorial](https://docs.abp.io/en/abp/3.2/Tutorials/Part-1) for the Blazor UI. Follow the [@abpframework](https://twitter.com/abpframework) Twitter account to get informed once it's ready. +We've **updated** the [web application development tutorial](https://docs.abp.io/en/abp/3.2/Tutorials/Part-1?UI=Blazor) for the **Blazor UI**. You can start to develop applications today! The **source code** of the BookStore application developed with this tutorial is [here](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore). ### Get started with the Blazor UI @@ -44,12 +44,10 @@ If you want to try the Blazor UI today, follow the instructions below. #### Upgrade the ABP CLI -> **Known issue**: When you upgrade the ABP CLI to `3.2.0-rc.1`, you won't be able to create new solutions with a stable version ([#5453](https://github.com/abpframework/abp/issues/5453)). Downgrade to `3.1.0` back after trying the preview version, if you want to create solutions with a stable version later. - Install the latest [ABP CLI](https://docs.abp.io/en/abp/3.2/CLI) preview version: ````bash -dotnet tool update Volo.Abp.Cli -g --version 3.2.0-rc.1 +dotnet tool update Volo.Abp.Cli -g --version 3.2.0-rc.2 ```` #### Create a new Solution @@ -70,10 +68,6 @@ Open the generated solution using the latest Visual Studio 2019. You will see a ![visual-studio-solution-with-blazor](visual-studio-solution-with-blazor.png) -> **A fix for the 3.2.0-rc.1** -> -> There is a bug in the `3.2.0-rc.1` that prevents `HttpApi.Host` project run properly, when you try to login to the application. **Follow the steps explained in the [#5457](https://github.com/abpframework/abp/issues/5457) for the `HttpApi.Host` project** to fix it for your solution, before running it. It will be resolved with the `3.2.0-rc.2`. - #### Run the Application * Run the `DbMigrator` project to create the database and seed the initial data. @@ -94,9 +88,35 @@ Beside the Blazor UI, there are a lot of issues have been closed with [the miles [MongoDB integration](https://docs.abp.io/en/abp/3.2/MongoDB) now supports multi-document transactions that comes with the MongoDB 4.x. -> Transactions are disabled for automated integration tests coming with the application startup template, since the Mongo2Go library (we use in the test projects) has a problem with the transactions. We've sent a [Pull Request](https://github.com/Mongo2Go/Mongo2Go/pull/101) to fix it and will enable the transactions again when they merge & release it. +We've **disabled transactions** for solutions use the MongoDB, inside the `YourProjectMongoDbModule.cs` file in the MongoDB project. If your MongoDB server **supports transactions**, you should manually enable it in this class: + +```csharp +Configure(options => +{ + options.TransactionBehavior = UnitOfWorkTransactionBehavior.Auto; +}); +``` + +> Or you can delete this code since this is already the default behavior. + +#### Upgrade Notes + +If you are upgrading an existing solution and your MongoDB server doesn't support transactions, please disable it: + +```csharp +Configure(options => +{ + options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled; +}); +``` + +See the [Unit Of Work document](https://docs.abp.io/en/abp/3.2/Unit-Of-Work) to learn more about UOW and transactions. + +#### Integration Tests + +> Transactions are also **disabled for automated integration tests** coming with the application startup template, since the [Mongo2Go](https://github.com/Mongo2Go/Mongo2Go) library (we use in the test projects) has a problem with the transactions. We've sent a [Pull Request](https://github.com/Mongo2Go/Mongo2Go/pull/101) to fix it and will enable the transactions again when they merge & release it. > -> If you are upgrading an existing solution and using MongoDB, please disable transactions for the test projects by following the [Unit Of Work](https://docs.abp.io/en/abp/3.2/Unit-Of-Work) documentation. +> If you are upgrading an existing solution and using MongoDB, please disable transactions for the test projects just as described above. ### Kafka Integration for the Distributed Event Bus diff --git a/docs/en/Getting-Started.md b/docs/en/Getting-Started.md index dbfb8a714e7..1ca6a61b1ab 100644 --- a/docs/en/Getting-Started.md +++ b/docs/en/Getting-Started.md @@ -124,10 +124,12 @@ The [startup template](Startup-templates/Index.md) **disables** transactions in ```csharp Configure(options => { - options.TransactionBehavior = UnitOfWorkTransactionBehavior.Enabled; + options.TransactionBehavior = UnitOfWorkTransactionBehavior.Auto; }); ``` +> Or you can delete this code since this is already the default behavior. + {{ end }} ## Create the Database diff --git a/docs/en/MongoDB.md b/docs/en/MongoDB.md index 1328cfc084e..475eb94f1bd 100644 --- a/docs/en/MongoDB.md +++ b/docs/en/MongoDB.md @@ -282,10 +282,12 @@ MongoDB supports multi-document transactions starting from the version 4.0 and t ```csharp Configure(options => { - options.TransactionBehavior = UnitOfWorkTransactionBehavior.Enabled; + options.TransactionBehavior = UnitOfWorkTransactionBehavior.Auto; }); ``` +> Or you can delete this code since this is already the default behavior. + ### Advanced Topics #### Set Default Repository Classes From 8a03af7d2c590017eca802931566c5586fe6dac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 21 Sep 2020 10:22:01 +0300 Subject: [PATCH 3/3] Update POST.md --- docs/en/Blog-Posts/2020-09-17 v3_2_Preview/POST.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/en/Blog-Posts/2020-09-17 v3_2_Preview/POST.md b/docs/en/Blog-Posts/2020-09-17 v3_2_Preview/POST.md index 0b7d7bfd73e..325811761b9 100644 --- a/docs/en/Blog-Posts/2020-09-17 v3_2_Preview/POST.md +++ b/docs/en/Blog-Posts/2020-09-17 v3_2_Preview/POST.md @@ -112,6 +112,8 @@ Configure(options => See the [Unit Of Work document](https://docs.abp.io/en/abp/3.2/Unit-Of-Work) to learn more about UOW and transactions. +Also, add [this file](https://github.com/abpframework/abp/blob/rel-3.2/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.MongoDB/MongoDb/MongoDbMyProjectNameDbSchemaMigrator.cs) into your MongoDB project (remember to change `MongoDbMyProjectNameDbSchemaMigrator` and `IMyProjectNameDbSchemaMigrator` with your own project name). + #### Integration Tests > Transactions are also **disabled for automated integration tests** coming with the application startup template, since the [Mongo2Go](https://github.com/Mongo2Go/Mongo2Go) library (we use in the test projects) has a problem with the transactions. We've sent a [Pull Request](https://github.com/Mongo2Go/Mongo2Go/pull/101) to fix it and will enable the transactions again when they merge & release it.