Files
ReC/src/ReC.Application/Results/Commands/UpdateResultCommand.cs
TekH e691faf620 Rename Result*Procedure to Result*Command for consistency
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.
2026-03-24 11:40:28 +01:00

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);
}
}