Refactor all Result-related procedure records, handlers, and usages to use the *Command suffix instead of *Procedure. Update controller actions, handler interfaces, tests, and InsertObjectProcedure accordingly. No functional changes; improves naming consistency across the codebase.
25 lines
732 B
C#
25 lines
732 B
C#
using MediatR;
|
|
using ReC.Application.Common.Procedures.UpdateProcedure;
|
|
using ReC.Application.Common.Procedures.UpdateProcedure.Dto;
|
|
|
|
namespace ReC.Application.Results.Commands;
|
|
|
|
public record UpdateResultCommand : IUpdateProcedure<UpdateResultDto>
|
|
{
|
|
public long Id { get; set; }
|
|
|
|
public UpdateResultDto Data { get; set; } = null!;
|
|
}
|
|
|
|
public class UpdateResultProcedureHandler(ISender sender) : IRequestHandler<UpdateResultCommand, int>
|
|
{
|
|
public async Task<int> Handle(UpdateResultCommand request, CancellationToken cancel)
|
|
{
|
|
return await sender.Send(new UpdateObjectProcedure
|
|
{
|
|
Entity = "RESULT",
|
|
Id = request.Id,
|
|
Result = request.Data
|
|
}, cancel);
|
|
}
|
|
} |