Skip to content

Commit 4a6deac

Browse files
committed
Moved app sample to JsonPatchSample folder
1 parent 5a9b06e commit 4a6deac

File tree

12 files changed

+4
-4
lines changed

12 files changed

+4
-4
lines changed

aspnetcore/web-api/jsonpatch.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,23 @@ dotnet add package Microsoft.AspNetCore.JsonPatch.SystemTextJson --prerelease
5959

6060
This package provides a <xref:Microsoft.AspNetCore.JsonPatch.JsonPatchDocument%601> class to represent a JSON Patch document for objects of type `T` and custom logic for serializing and deserializing JSON Patch documents using <xref:System.Text.Json>. The key method of the <xref:Microsoft.AspNetCore.JsonPatch.JsonPatchDocument%601> class is <xref:Microsoft.AspNetCore.JsonPatch.JsonPatchDocument.ApplyTo(System.Object)>, which applies the patch operations to a target object of type `T`.
6161

62-
## Controller Action method code applying JSON Patch
62+
## Action method code applying JSON Patch
6363

6464
In an API controller, an action method for JSON Patch:
6565

6666
* Is annotated with the <xref:Microsoft.AspNetCore.Mvc.HttpPatchAttribute> attribute.
6767
* Accepts a <xref:Microsoft.AspNetCore.JsonPatch.JsonPatchDocument%601>, typically with [<xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute>](xref:Microsoft.AspNetCore.Mvc.FromBodyAttribute).
6868
* Calls <xref:Microsoft.AspNetCore.JsonPatch.JsonPatchDocument.ApplyTo(System.Object)> on the patch document to apply the changes.
6969

70-
### Example Action method:
70+
### Example Controller Action method:
7171

7272
:::code language="csharp" source="~/web-api/jsonpatch/samples/10.x/JsonPatchSample/Controllers/CustomerController.cs" id="snippet_PatchAction" highlight="1,2,14-19":::
7373

7474
This code from the sample app works with the following `Customer` and `Order` models:
7575

76-
:::code language="csharp" source="~/web-api/jsonpatch/samples/10.x/api/Models/Customer.cs":::
76+
:::code language="csharp" source="~/web-api/jsonpatch/samples/10.x/JsonPatchSample/Models/Customer.cs":::
7777

78-
:::code language="csharp" source="~/web-api/jsonpatch/samples/10.x/api/Models/Order.cs":::
78+
:::code language="csharp" source="~/web-api/jsonpatch/samples/10.x/JsonPatchSample/Models/Order.cs":::
7979

8080
The sample action method's key steps:
8181

0 commit comments

Comments
 (0)