mirror of
https://github.com/zoriya/EntityFrameworkCore.Projectables.git
synced 2025-12-06 05:56:10 +00:00
Fix eager includes of skip navigations
This commit is contained in:
@@ -258,6 +258,9 @@ namespace EntityFrameworkCore.Projectables.Services
|
||||
.Concat(entityType.GetNavigations()
|
||||
.Where(x => !x.IsShadowProperty())
|
||||
.Select(x => x.GetMemberInfo(false, false)))
|
||||
.Concat(entityType.GetSkipNavigations()
|
||||
.Where(x => !x.IsShadowProperty())
|
||||
.Select(x => x.GetMemberInfo(false, false)))
|
||||
// Remove projectable properties from the ef properties. Since properties returned here for auto
|
||||
// properties (like `public string Test {get;set;}`) are generated fields, we also need to take them into account.
|
||||
.Where(x => projectableProperties.All(y => x.Name != y.Name && x.Name != $"<{y.Name}>k__BackingField"));
|
||||
|
||||
Reference in New Issue
Block a user