(feature): patch model field and operations
This commit is contained in:
parent
fd799615f7
commit
387e4d68ff
@ -8,7 +8,7 @@
|
||||
|
||||
<!-- NuGet package metadata -->
|
||||
<PackageId>MaksIT.Core</PackageId>
|
||||
<Version>1.1.4</Version>
|
||||
<Version>1.1.5</Version>
|
||||
<Authors>Maksym Sadovnychyy</Authors>
|
||||
<Company>MAKS-IT</Company>
|
||||
<Product>MaksIT.Core</Product>
|
||||
|
||||
7
src/MaksIT.Core/Webapi/Models/PatchField.cs
Normal file
7
src/MaksIT.Core/Webapi/Models/PatchField.cs
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
namespace MaksIT.Core.Webapi.Models;
|
||||
|
||||
public class PatchField<T> {
|
||||
public PatchOperation Operation { get; set; }
|
||||
public T? Value { get; set; }
|
||||
}
|
||||
8
src/MaksIT.Core/Webapi/Models/PatchOperation.cs
Normal file
8
src/MaksIT.Core/Webapi/Models/PatchOperation.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace MaksIT.Core.Webapi.Models;
|
||||
|
||||
public enum PatchOperation {
|
||||
Replace,
|
||||
Add,
|
||||
Remove,
|
||||
Clear // for collections
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user