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.
This commit is contained in:
25
src/ReC.Application/Results/Commands/UpdateResultCommand.cs
Normal file
25
src/ReC.Application/Results/Commands/UpdateResultCommand.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user