Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build_publish.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Distribute Nuget version
run-name: Build and provide a new Nuget package.
on:
pull_request:
branches:
Expand Down Expand Up @@ -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
run: dotnet nuget push **\*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down