From 0e521c459cf0c684c15d78f66d851bf581e59e29 Mon Sep 17 00:00:00 2001 From: CloudFy <31371919+cloudfy@users.noreply.github.com> Date: Tue, 17 Jan 2023 11:22:01 +0100 Subject: [PATCH 1/2] Update build_publish.yml --- .github/workflows/build_publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index e2d5c8b..65af9ab 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -1,3 +1,5 @@ +name: Distribute Nuget version +run-name: Build and provide a new Nuget package. on: pull_request: branches: @@ -25,4 +27,4 @@ jobs: run: dotnet pack --configuration Release - name: Publish - run: dotnet nuget push **\*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json \ No newline at end of file + run: dotnet nuget push **\*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json From 8ab543263c0964f47bae5a610d9b8a9b7d8cf203 Mon Sep 17 00:00:00 2001 From: CloudFy <31371919+cloudfy@users.noreply.github.com> Date: Tue, 14 Feb 2023 07:17:37 +0100 Subject: [PATCH 2/2] Update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4b2f7e6..ce25e03 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ PS> Install-Package Patchable ## Introduction Partial changes of entities is a common task when implementing RESTful services in ASP.NET Web API. RESTful services provide the use of [HTTP PATCH](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH) to conduct partial entity updates. -The ```Patchable``` library enables a convenient approach to only patch partial properties whilst also validating the properties. +The ```Patchable``` library enables a convenient approach to only patch partial properties whilst also validating the properties of the containing object. In addition, supporting null value handling (was the property supplied, and was it set to null) is solved. ### Example Follow this example to patch a single item. @@ -58,10 +58,11 @@ Response: } ``` - - # Documentation +## Using Patchable in tiered or CQRS +When using Patchable in a tiered layer application or CQRS scope, add the Nuget on the business layer (tiered) or command side (CQRS). Inheritance will handle the population. It is easy to use Patchable in Entity Framework Core (EFCore) to only map changed properties of a given DbSet<>. This minimized database payload of roundtrips and reduce collissions that create bad data. + ## PatchOptions ### Constructor