Browse Source
Merge pull request #6047 from abpframework/maliming-patch-1
Update Customizing-Application-Modules-Overriding-Services.md
pull/6129/head
liangshiwei
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
0 additions and
2 deletions
docs/en/Customizing-Application-Modules-Overriding-Services.md
docs/zh-Hans/Customizing-Application-Modules-Overriding-Services.md
@ -59,7 +59,6 @@ In most cases, you will want to change one or a few methods of the current imple
### Example: Overriding an Application Service
### Example: Overriding an Application Service
````csharp
````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)]
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IIdentityUserAppService), typeof(IdentityUserAppService), typeof(MyIdentityUserAppService))]
[ExposeServices(typeof(IIdentityUserAppService), typeof(IdentityUserAppService), typeof(MyIdentityUserAppService))]
public class MyIdentityUserAppService : IdentityUserAppService
public class MyIdentityUserAppService : IdentityUserAppService
@ -59,7 +59,6 @@ context.Services.Replace(
### 示例: 重写服务方法
### 示例: 重写服务方法
````csharp
````csharp
//[RemoteService(IsEnabled = false)] // 如果你在使用动态控制器,为了避免为应用服务创建重复的控制器, 你可以禁用远程访问.
[Dependency(ReplaceServices = true)]
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IIdentityUserAppService), typeof(IdentityUserAppService), typeof(MyIdentityUserAppService))]
[ExposeServices(typeof(IIdentityUserAppService), typeof(IdentityUserAppService), typeof(MyIdentityUserAppService))]
public class MyIdentityUserAppService : IdentityUserAppService
public class MyIdentityUserAppService : IdentityUserAppService