From ad8da94854581dc614839331b4808c03b54bc1a0 Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Sun, 29 Dec 2019 11:18:51 +0800 Subject: [PATCH] Update repository method to WithDetails in docs --- .../en/Best-Practices/Entity-Framework-Core-Integration.md | 7 +++---- .../Best-Practices/Entity-Framework-Core-Integration.md | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/en/Best-Practices/Entity-Framework-Core-Integration.md b/docs/en/Best-Practices/Entity-Framework-Core-Integration.md index f150bd6f66..4f7e20dd70 100644 --- a/docs/en/Best-Practices/Entity-Framework-Core-Integration.md +++ b/docs/en/Best-Practices/Entity-Framework-Core-Integration.md @@ -174,12 +174,12 @@ public static IQueryable IncludeDetails( * **Do** use the `IncludeDetails` extension method in the repository methods just like used in the example code above (see FindByNormalizedUserNameAsync). -- **Do** override `IncludeDetails` method of the repository for aggregates root which have **sub collections**. Example: +- **Do** override `WithDetails` method of the repository for aggregates root which have **sub collections**. Example: ````C# -protected override IQueryable IncludeDetails(IQueryable queryable) +public override IQueryable WithDetails() { - return queryable.IncludeDetails(); //uses the extension method defined above + return GetQueryable().IncludeDetails(); // Uses the extension method defined above } ```` @@ -206,4 +206,3 @@ public class AbpIdentityEntityFrameworkCoreModule : AbpModule } } ```` - diff --git a/docs/zh-Hans/Best-Practices/Entity-Framework-Core-Integration.md b/docs/zh-Hans/Best-Practices/Entity-Framework-Core-Integration.md index 3dd687be53..4d98c6cbc5 100644 --- a/docs/zh-Hans/Best-Practices/Entity-Framework-Core-Integration.md +++ b/docs/zh-Hans/Best-Practices/Entity-Framework-Core-Integration.md @@ -173,12 +173,12 @@ public static IQueryable IncludeDetails( * **推荐** 推荐在仓储其他方法中使用 `IncludeDetails` 扩展方法, 就像上面的示例代码一样(参阅 FindByNormalizedUserNameAsync). -- **推荐** 覆盖具有 **子集合** 的聚合根仓储中的`IncludeDetails` 方法. 例如: +- **推荐** 覆盖具有 **子集合** 的聚合根仓储中的 `WithDetails` 方法. 例如: ````C# -protected override IQueryable IncludeDetails(IQueryable queryable) +public override IQueryable WithDetails() { - return queryable.IncludeDetails(); //uses the extension method defined above + return GetQueryable().IncludeDetails(); // Uses the extension method defined above } ```` @@ -205,4 +205,3 @@ public class AbpIdentityEntityFrameworkCoreModule : AbpModule } } ```` -