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:
26
src/ReC.Application/Results/Commands/InsertResultCommand.cs
Normal file
26
src/ReC.Application/Results/Commands/InsertResultCommand.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using MediatR;
|
||||
using ReC.Application.Common.Procedures.InsertProcedure;
|
||||
|
||||
namespace ReC.Application.Results.Commands;
|
||||
|
||||
public record InsertResultCommand : IInsertProcedure
|
||||
{
|
||||
public long? ActionId { get; set; }
|
||||
public short? StatusId { get; set; }
|
||||
public string? Header { get; set; }
|
||||
public string? Body { get; set; }
|
||||
public string? Info { get; set; }
|
||||
public string? Error { get; set; }
|
||||
}
|
||||
|
||||
public class InsertResultProcedureHandler(ISender sender) : IRequestHandler<InsertResultCommand, long>
|
||||
{
|
||||
public async Task<long> Handle(InsertResultCommand request, CancellationToken cancel)
|
||||
{
|
||||
return await sender.Send(new InsertObjectProcedure
|
||||
{
|
||||
Entity = "RESULT",
|
||||
Result = request
|
||||
}, cancel);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user