Refactor: Rename DeleteEndpointAuthProcedure to Command
Renamed DeleteEndpointAuthProcedure to DeleteEndpointAuthCommand across the codebase, including controller, handler, and tests, to improve naming consistency and align with CQRS conventions for write operations.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using MediatR;
|
||||
using ReC.Application.Common.Procedures.DeleteProcedure;
|
||||
|
||||
namespace ReC.Application.EndpointAuth.Commands;
|
||||
|
||||
public record DeleteEndpointAuthCommand : IDeleteProcedure
|
||||
{
|
||||
/// <summary>
|
||||
/// Start GUID/ID (inclusive)
|
||||
/// </summary>
|
||||
public long Start { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// End GUID/ID (inclusive). If 0, will be set to Start value.
|
||||
/// </summary>
|
||||
public long End { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If true, delete even if dependent ACTION data exists
|
||||
/// </summary>
|
||||
public bool Force { get; set; }
|
||||
}
|
||||
|
||||
public class DeleteEndpointAuthProcedureHandler(ISender sender) : IRequestHandler<DeleteEndpointAuthCommand, int>
|
||||
{
|
||||
public async Task<int> Handle(DeleteEndpointAuthCommand request, CancellationToken cancel)
|
||||
{
|
||||
return await sender.Send(new DeleteObjectProcedure
|
||||
{
|
||||
Entity = "ENDPOINT_AUTH",
|
||||
Start = request.Start,
|
||||
End = request.End,
|
||||
Force = request.Force
|
||||
}, cancel);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user