diff --git a/src/MaksIT.Core/Abstractions/Query/QueryResultBase.cs b/src/MaksIT.Core/Abstractions/Query/QueryResultBase.cs new file mode 100644 index 0000000..e7e721a --- /dev/null +++ b/src/MaksIT.Core/Abstractions/Query/QueryResultBase.cs @@ -0,0 +1,5 @@ +namespace MaksIT.Core.Abstractions.Query; + +public abstract class QueryResultBase { + public required T Id { get; set; } +} \ No newline at end of file diff --git a/src/MaksIT.Core/Abstractions/Webapi/PatchRequestModelBase.cs b/src/MaksIT.Core/Abstractions/Webapi/PatchRequestModelBase.cs index b221924..9f95b23 100644 --- a/src/MaksIT.Core/Abstractions/Webapi/PatchRequestModelBase.cs +++ b/src/MaksIT.Core/Abstractions/Webapi/PatchRequestModelBase.cs @@ -41,13 +41,13 @@ public abstract class PatchRequestModelBase : RequestModelBase { public override IEnumerable Validate(ValidationContext validationContext) { if (!HasNonNullPatchField) { - yield return new ValidationResult("At least one patch field must be provided", new string[] { "PatchField" }); + yield return new ValidationResult("At least one patch field must be provided", ["PatchField"]); } if (Operations != null) { foreach (var operation in Operations) { if (!Enum.IsDefined(typeof(PatchOperation), operation.Value)) { - yield return new ValidationResult($"Invalid patch operation '{operation.Value}' for property '{operation.Key}'", new string[] { operation.Key }); + yield return new ValidationResult($"Invalid patch operation '{operation.Value}' for property '{operation.Key}'", [operation.Key]); } } } diff --git a/src/MaksIT.Core/MaksIT.Core.csproj b/src/MaksIT.Core/MaksIT.Core.csproj index a03cd5d..a8ba0bc 100644 --- a/src/MaksIT.Core/MaksIT.Core.csproj +++ b/src/MaksIT.Core/MaksIT.Core.csproj @@ -8,7 +8,7 @@ MaksIT.Core - 1.3.5 + 1.3.6 Maksym Sadovnychyy MAKS-IT MaksIT.Core