Skip to content

Commit

Permalink
Slight documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethmugo committed Apr 9, 2024
1 parent e06726f commit d1e0faa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Tingle.AspNetCore.JsonPatch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ For example, the following JSON documents represent a resource, a JSON Merge Pat

```json
{
"id": "1",
"name": null,
"phone": "+254722000000",
"country": "ken"
Expand All @@ -54,12 +55,15 @@ For example, the following JSON documents represent a resource, a JSON Merge Pat

```json
{
"id": "1",
"name": "Fabrikam",
"phone": "+254722000001",
"country": null
}
```

`id` property remains unchanged as it is not part of the merge patch request.

### JSON Merge Patch in ASP.NET Core

Define a `Customer` model:
Expand All @@ -73,7 +77,7 @@ class Customer
}
```

Add the following logic in the `program.cs` file. This same logic can be added to `startup.cs`.
Add the following logic in the `Program.cs` file. This same logic can be added to `Startup.cs`.

```cs
var builder = WebApplication.CreateBuilder(args);
Expand Down

0 comments on commit d1e0faa

Please sign in to comment.