Refactored ValidationBehavior to use C# 12 primary constructors and file-scoped namespaces, simplifying the Handle method logic. Updated CreateResultViewCommand to implement IAuthScoped and IRequest, replaced AddedWho with a non-serialized Scope property, and added necessary usings and namespace.
19 lines
454 B
C#
19 lines
454 B
C#
using MediatR;
|
|
using ReC.Application.Common.Interfaces;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace ReC.Application.ResultViews.Commands;
|
|
|
|
public class CreateResultViewCommand : IAuthScoped, IRequest
|
|
{
|
|
public required long ActionId { get; set; }
|
|
|
|
public required short StatusCode { get; set; }
|
|
|
|
public string? Header { get; set; }
|
|
|
|
public string? Body { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public AuthScope Scope { get; } = new();
|
|
} |