Renamed Insert/Update/DeleteEndpointProcedure classes to their respective Command counterparts to follow CQRS conventions. Updated controller actions, handlers, InsertObjectProcedure, and related unit tests to use the new Command types. No functional changes were made; this is a naming refactor.
23 lines
670 B
C#
23 lines
670 B
C#
using MediatR;
|
|
using ReC.Application.Common.Procedures.InsertProcedure;
|
|
|
|
namespace ReC.Application.Endpoints.Commands;
|
|
|
|
public record InsertEndpointCommand : IInsertProcedure
|
|
{
|
|
public bool? Active { get; set; }
|
|
public string? Description { get; set; }
|
|
public string? Uri { get; set; }
|
|
}
|
|
|
|
public class InsertEndpointProcedureHandler(ISender sender) : IRequestHandler<InsertEndpointCommand, long>
|
|
{
|
|
public async Task<long> Handle(InsertEndpointCommand request, CancellationToken cancel)
|
|
{
|
|
return await sender.Send(new InsertObjectProcedure
|
|
{
|
|
Entity = "ENDPOINT",
|
|
Endpoint = request
|
|
}, cancel);
|
|
}
|
|
} |