Browse Source

Merge pull request #2493 from acjh/patch-3

Update repository method to WithDetails in docs
pull/2503/head
Halil İbrahim Kalkan 7 years ago
committed by GitHub
parent
commit
77ad1033af
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      docs/en/Best-Practices/Entity-Framework-Core-Integration.md
  2. 7
      docs/zh-Hans/Best-Practices/Entity-Framework-Core-Integration.md

7
docs/en/Best-Practices/Entity-Framework-Core-Integration.md

@ -174,12 +174,12 @@ public static IQueryable<IdentityUser> 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<IdentityUser> IncludeDetails(IQueryable<IdentityUser> queryable)
public override IQueryable<IdentityUser> 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
}
}
````

7
docs/zh-Hans/Best-Practices/Entity-Framework-Core-Integration.md

@ -173,12 +173,12 @@ public static IQueryable<IdentityUser> IncludeDetails(
* **推荐** 推荐在仓储其他方法中使用 `IncludeDetails` 扩展方法, 就像上面的示例代码一样(参阅 FindByNormalizedUserNameAsync).
- **推荐** 覆盖具有 **子集合** 的聚合根仓储中的`IncludeDetails` 方法. 例如:
- **推荐** 覆盖具有 **子集合** 的聚合根仓储中的 `WithDetails` 方法. 例如:
````C#
protected override IQueryable<IdentityUser> IncludeDetails(IQueryable<IdentityUser> queryable)
public override IQueryable<IdentityUser> 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
}
}
````

Loading…
Cancel
Save