Mark CreateResultViewCommand as obsolete, add handler
CreateResultViewCommand is now marked obsolete, advising use of related procedures or views instead. Added an obsolete CreateResultViewCommandHandler that delegates creation to the repository.
This commit is contained in:
@@ -6,6 +6,7 @@ using System.Text.Json.Serialization;
|
||||
|
||||
namespace ReC.Application.OutResults.Commands;
|
||||
|
||||
[Obsolete("Use the related procedure or view.")]
|
||||
public class CreateResultViewCommand : IAuthScoped, IRequest
|
||||
{
|
||||
public required long ActionId { get; set; }
|
||||
@@ -20,6 +21,7 @@ public class CreateResultViewCommand : IAuthScoped, IRequest
|
||||
public AuthScope Scope { get; } = new();
|
||||
}
|
||||
|
||||
[Obsolete("Use the related procedure or view.")]
|
||||
public class CreateResultViewCommandHandler(IRepository<ResultView> repo) : IRequestHandler<CreateResultViewCommand>
|
||||
{
|
||||
public Task Handle(CreateResultViewCommand request, CancellationToken cancel) => repo.CreateAsync(request, cancel);
|
||||
|
||||
Reference in New Issue
Block a user