We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Select
EfIncludePathHelper
1 parent 2b0169e commit 381d1b1Copy full SHA for 381d1b1
1 file changed
JsonApiToolkit/Helpers/EfIncludePathHelper.cs
@@ -21,19 +21,16 @@ public static List<string> MapIncludePathsToClrProperties<T>(List<string>? inclu
21
return [];
22
23
var type = typeof(T);
24
- var mapped = new List<string>(includePaths.Count);
25
26
- foreach (var path in includePaths.Where(p => !string.IsNullOrWhiteSpace(p)))
27
- {
28
- var mappedPath = s_includePathCache.GetOrAdd(
29
- (type, path),
30
- key => MapSinglePath(key.Item1, key.Item2)
31
- );
32
-
33
- mapped.Add(mappedPath);
34
- }
35
36
- return mapped;
+ return includePaths
+ .Where(p => !string.IsNullOrWhiteSpace(p))
+ .Select(path =>
+ s_includePathCache.GetOrAdd(
+ (type, path),
+ key => MapSinglePath(key.Item1, key.Item2)
+ )
+ .ToList();
37
}
38
39
private static string MapSinglePath(Type startType, string path)
0 commit comments