From 4538506453b0604e82a660a03903395dd9fae5ac Mon Sep 17 00:00:00 2001 From: Super Date: Fri, 22 May 2020 18:02:18 +0800 Subject: [PATCH 1/2] #4052 Add a RemoteService tip to Overriding-Service doc --- docs/en/Customizing-Application-Modules-Overriding-Services.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/en/Customizing-Application-Modules-Overriding-Services.md b/docs/en/Customizing-Application-Modules-Overriding-Services.md index b9890b3aca..0dd3d88c2d 100644 --- a/docs/en/Customizing-Application-Modules-Overriding-Services.md +++ b/docs/en/Customizing-Application-Modules-Overriding-Services.md @@ -99,6 +99,8 @@ This class **overrides** the `CreateAsync` method of the `IdentityUserAppService You could completely **re-write** the entire business logic for a user creation without calling the base method. +> It's better to add the attribute `[RemoteService(IsEnabled = false)]` if the [Auto API Controllers](API/Auto-API-Controllers.md) is enabled, otherwise the extra APIs for MyIdentityUser will be generated. + ### Example: Overriding a Domain Service ````csharp From 915cbfb0f0c3bf4848782ad8e6017d53f5ffa12b Mon Sep 17 00:00:00 2001 From: Super Date: Mon, 1 Jun 2020 15:32:58 +0800 Subject: [PATCH 2/2] Update Customizing-Application-Modules-Overriding-Services.md --- docs/en/Customizing-Application-Modules-Overriding-Services.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/en/Customizing-Application-Modules-Overriding-Services.md b/docs/en/Customizing-Application-Modules-Overriding-Services.md index 0dd3d88c2d..ce3729c1ac 100644 --- a/docs/en/Customizing-Application-Modules-Overriding-Services.md +++ b/docs/en/Customizing-Application-Modules-Overriding-Services.md @@ -59,6 +59,7 @@ In most cases, you will want to change one or a few methods of the current imple ### Example: Overriding an Application Service ````csharp +//[RemoteService(IsEnabled = false)] // If you use dynamic controller feature you can disable remote service. Prevent creating duplicate controller for the application service. [Dependency(ReplaceServices = true)] [ExposeServices(typeof(IIdentityUserAppService), typeof(IdentityUserAppService))] public class MyIdentityUserAppService : IdentityUserAppService @@ -99,8 +100,6 @@ This class **overrides** the `CreateAsync` method of the `IdentityUserAppService You could completely **re-write** the entire business logic for a user creation without calling the base method. -> It's better to add the attribute `[RemoteService(IsEnabled = false)]` if the [Auto API Controllers](API/Auto-API-Controllers.md) is enabled, otherwise the extra APIs for MyIdentityUser will be generated. - ### Example: Overriding a Domain Service ````csharp