@@ -276,7 +276,7 @@ This approach ensures that all required navigation properties are automatically
276276<!-- snippet: ProjectedFieldBasicTransform -->
277277<a id =' snippet-ProjectedFieldBasicTransform ' ></a >
278278``` cs
279- AddProjectedNavigationField <string ?, string >(
279+ AddProjectedField <string ?, string >(
280280 name : " propertyUpper" ,
281281 projection : source => source .Property ,
282282 transform : property => property ? .ToUpper () ?? " " );
@@ -290,7 +290,7 @@ AddProjectedNavigationField<string?, string>(
290290<!-- snippet: ProjectedFieldAsyncTransform -->
291291<a id =' snippet-ProjectedFieldAsyncTransform ' ></a >
292292``` cs
293- AddProjectedNavigationField <string ?, string >(
293+ AddProjectedField <string ?, string >(
294294 name : " propertyUpperAsync" ,
295295 projection : source => source .Property ,
296296 transform : async property =>
@@ -303,36 +303,17 @@ AddProjectedNavigationField<string?, string>(
303303<!-- endSnippet -->
304304
305305
306- ### Context-Aware Transform
307-
308- <!-- snippet: ProjectedFieldContextAwareTransform -->
309- <a id =' snippet-ProjectedFieldContextAwareTransform ' ></a >
310- ``` cs
311- AddProjectedNavigationField <string ?, string >(
312- name : " propertyWithContext" ,
313- projection : source => source .Property ,
314- transform : (context , property ) =>
315- {
316- var prefix = context .Source .Id .ToString ()[.. 8 ];
317- return $" {prefix }: {property ?? " null" }" ;
318- });
319- ```
320- <sup ><a href =' /src/Tests/IntegrationTests/Graphs/ParentGraphType.cs#L39-L50 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-ProjectedFieldContextAwareTransform ' title =' Start of snippet ' >anchor</a ></sup >
321- <!-- endSnippet -->
322-
323-
324306### List Field
325307
326308<!-- snippet: ProjectedFieldListField -->
327309<a id =' snippet-ProjectedFieldListField ' ></a >
328310``` cs
329- AddProjectedNavigationListField < ChildEntity , string ?, string >(
311+ AddProjectedListField < string ?, string >(
330312 name : " childrenProperties" ,
331- navigation : source => source .Children ,
332- projection : child => child .Property ,
313+ projection : source => source .Children .Select (c => c .Property ),
333314 transform : property => property ?? " empty" );
334315```
335- <sup ><a href =' /src/Tests/IntegrationTests/Graphs/ParentGraphType.cs#L52-L60 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-ProjectedFieldListField ' title =' Start of snippet ' >anchor</a ></sup >
316+ <sup ><a href =' /src/Tests/IntegrationTests/Graphs/ParentGraphType.cs#L45-L52 ' title =' Snippet source file ' >snippet source</a > | <a href =' #snippet-ProjectedFieldListField ' title =' Start of snippet ' >anchor</a ></sup >
336317<!-- endSnippet -->
337318
338319
@@ -341,7 +322,7 @@ AddProjectedNavigationListField<ChildEntity, string?, string>(
341322<!-- snippet: ProjectedFieldNestedNavigation -->
342323<a id =' snippet-ProjectedFieldNestedNavigation ' ></a >
343324``` cs
344- AddProjectedNavigationField <string ?, string >(
325+ AddProjectedField <string ?, string >(
345326 name : " level2Property" ,
346327 projection : source => source .Level2Entity ! .Level3Entity ! .Property ,
347328 transform : property => property ?? " none" );
0 commit comments