Rename *ActionProcedure classes to *ActionCommand
Renamed InsertActionProcedure, UpdateActionProcedure, and DeleteActionProcedure to their respective *ActionCommand counterparts to align with CQRS conventions. Updated all controller actions, handlers, tests, and related usages accordingly. No changes to business logic or method signatures.
This commit is contained in:
@@ -3,7 +3,7 @@ using ReC.Application.Common.Procedures.DeleteProcedure;
|
||||
|
||||
namespace ReC.Application.RecActions.Commands;
|
||||
|
||||
public record DeleteActionProcedure : IDeleteProcedure
|
||||
public record DeleteActionCommand : IDeleteProcedure
|
||||
{
|
||||
/// <summary>
|
||||
/// Start GUID/ID (inclusive)
|
||||
@@ -21,9 +21,9 @@ public record DeleteActionProcedure : IDeleteProcedure
|
||||
public bool Force { get; set; }
|
||||
}
|
||||
|
||||
public class DeleteActionProcedureHandler(ISender sender) : IRequestHandler<DeleteActionProcedure, int>
|
||||
public class DeleteActionProcedureHandler(ISender sender) : IRequestHandler<DeleteActionCommand, int>
|
||||
{
|
||||
public async Task<int> Handle(DeleteActionProcedure request, CancellationToken cancel)
|
||||
public async Task<int> Handle(DeleteActionCommand request, CancellationToken cancel)
|
||||
{
|
||||
return await sender.Send(new DeleteObjectProcedure
|
||||
{
|
||||
@@ -4,7 +4,7 @@ using ReC.Domain.Constants;
|
||||
|
||||
namespace ReC.Application.RecActions.Commands;
|
||||
|
||||
public record InsertActionProcedure : IInsertProcedure
|
||||
public record InsertActionCommand : IInsertProcedure
|
||||
{
|
||||
public long? ProfileId { get; set; }
|
||||
public bool? Active { get; set; }
|
||||
@@ -21,9 +21,9 @@ public record InsertActionProcedure : IInsertProcedure
|
||||
public byte? ErrorActionId { get; set; }
|
||||
}
|
||||
|
||||
public class InsertActionProcedureHandler(ISender sender) : IRequestHandler<InsertActionProcedure, long>
|
||||
public class InsertActionProcedureHandler(ISender sender) : IRequestHandler<InsertActionCommand, long>
|
||||
{
|
||||
public async Task<long> Handle(InsertActionProcedure request, CancellationToken cancel)
|
||||
public async Task<long> Handle(InsertActionCommand request, CancellationToken cancel)
|
||||
{
|
||||
return await sender.Send(new InsertObjectProcedure
|
||||
{
|
||||
@@ -4,16 +4,16 @@ using ReC.Application.Common.Procedures.UpdateProcedure.Dto;
|
||||
|
||||
namespace ReC.Application.RecActions.Commands;
|
||||
|
||||
public record UpdateActionProcedure : IUpdateProcedure<UpdateActionDto>
|
||||
public record UpdateActionCommand : IUpdateProcedure<UpdateActionDto>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
public UpdateActionDto Data { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class UpdateActionProcedureHandler(ISender sender) : IRequestHandler<UpdateActionProcedure, int>
|
||||
public class UpdateActionProcedureHandler(ISender sender) : IRequestHandler<UpdateActionCommand, int>
|
||||
{
|
||||
public async Task<int> Handle(UpdateActionProcedure request, CancellationToken cancel)
|
||||
public async Task<int> Handle(UpdateActionCommand request, CancellationToken cancel)
|
||||
{
|
||||
return await sender.Send(new UpdateObjectProcedure
|
||||
{
|
||||
Reference in New Issue
Block a user