Rename EndpointParams procedures to commands for CQRS clarity

Renamed Insert/Update/DeleteEndpointParamsProcedure classes and
handlers to use the "Command" suffix (e.g., InsertEndpointParamsCommand)
for consistency with CQRS conventions. Updated all controller actions,
handlers, and tests to use the new command names. This improves
clarity and aligns naming with standard command patterns.
This commit is contained in:
2026-03-24 11:37:30 +01:00
parent d3d24a0fb6
commit 5df36d94e0
6 changed files with 16 additions and 16 deletions

View File

@@ -29,7 +29,7 @@ public record InsertObjectProcedure : IRequest<long>
public InsertEndpointAuthCommand EndpointAuth { get; set; } = new();
public InsertProfileProcedure Profile { get; set; } = new();
public InsertResultProcedure Result { get; set; } = new();
public InsertEndpointParamsProcedure EndpointParams { get; set; } = new();
public InsertEndpointParamsCommand EndpointParams { get; set; } = new();
}
public class InsertObjectProcedureHandler(IRepository repo, IOptionsMonitor<SqlExceptionOptions> sqlExOpt) : IRequestHandler<InsertObjectProcedure, long>

View File

@@ -3,7 +3,7 @@ using ReC.Application.Common.Procedures.DeleteProcedure;
namespace ReC.Application.EndpointParams.Commands;
public record DeleteEndpointParamsProcedure : IDeleteProcedure
public record DeleteEndpointParamsCommand : IDeleteProcedure
{
/// <summary>
/// Start GUID/ID (inclusive)
@@ -21,9 +21,9 @@ public record DeleteEndpointParamsProcedure : IDeleteProcedure
public bool Force { get; set; }
}
public class DeleteEndpointParamsProcedureHandler(ISender sender) : IRequestHandler<DeleteEndpointParamsProcedure, int>
public class DeleteEndpointParamsProcedureHandler(ISender sender) : IRequestHandler<DeleteEndpointParamsCommand, int>
{
public async Task<int> Handle(DeleteEndpointParamsProcedure request, CancellationToken cancel)
public async Task<int> Handle(DeleteEndpointParamsCommand request, CancellationToken cancel)
{
return await sender.Send(new DeleteObjectProcedure
{

View File

@@ -3,7 +3,7 @@ using ReC.Application.Common.Procedures.InsertProcedure;
namespace ReC.Application.EndpointParams.Commands;
public record InsertEndpointParamsProcedure : IInsertProcedure
public record InsertEndpointParamsCommand : IInsertProcedure
{
public bool? Active { get; set; }
public string? Description { get; set; }
@@ -13,9 +13,9 @@ public record InsertEndpointParamsProcedure : IInsertProcedure
public string? Value { get; set; }
}
public class InsertEndpointParamsProcedureHandler(ISender sender) : IRequestHandler<InsertEndpointParamsProcedure, long>
public class InsertEndpointParamsProcedureHandler(ISender sender) : IRequestHandler<InsertEndpointParamsCommand, long>
{
public async Task<long> Handle(InsertEndpointParamsProcedure request, CancellationToken cancel)
public async Task<long> Handle(InsertEndpointParamsCommand request, CancellationToken cancel)
{
return await sender.Send(new InsertObjectProcedure
{

View File

@@ -4,16 +4,16 @@ using ReC.Application.Common.Procedures.UpdateProcedure.Dto;
namespace ReC.Application.EndpointParams.Commands;
public record UpdateEndpointParamsProcedure : IUpdateProcedure<UpdateEndpointParamsDto>
public record UpdateEndpointParamsCommand : IUpdateProcedure<UpdateEndpointParamsDto>
{
public long Id { get; set; }
public UpdateEndpointParamsDto Data { get; set; } = null!;
}
public class UpdateEndpointParamsProcedureHandler(ISender sender) : IRequestHandler<UpdateEndpointParamsProcedure, int>
public class UpdateEndpointParamsProcedureHandler(ISender sender) : IRequestHandler<UpdateEndpointParamsCommand, int>
{
public async Task<int> Handle(UpdateEndpointParamsProcedure request, CancellationToken cancel)
public async Task<int> Handle(UpdateEndpointParamsCommand request, CancellationToken cancel)
{
return await sender.Send(new UpdateObjectProcedure
{