using MediatR; using ReC.Application.Common.Procedures.DeleteProcedure; using ReC.Application.Common.Procedures; namespace ReC.Application.EndpointAuth.Commands; public record DeleteEndpointAuthCommand : IDeleteProcedure { /// /// Start GUID/ID (inclusive) /// public long Start { get; set; } /// /// End GUID/ID (inclusive). If 0, will be set to Start value. /// public long End { get; set; } /// /// If true, delete even if dependent ACTION data exists /// public bool Force { get; set; } } public class DeleteEndpointAuthProcedureHandler(ISender sender) : IRequestHandler { public async Task Handle(DeleteEndpointAuthCommand request, CancellationToken cancel) { return await sender.Send(new DeleteObjectProcedure { Entity = EntityType.EndpointAuth, Start = request.Start, End = request.End, Force = request.Force }, cancel); } }