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 } } ```` -