Rename Profile*Procedure types to Profile*Command for clarity
Renamed InsertProfileProcedure, UpdateProfileProcedure, and DeleteProfileProcedure (and their handlers) to use the "Command" suffix for consistency. Updated all usages in controllers, handlers, and tests. No logic changes; only type names were updated for improved clarity.
This commit is contained in:
25
src/ReC.Application/Profile/Commands/UpdateProfileCommand.cs
Normal file
25
src/ReC.Application/Profile/Commands/UpdateProfileCommand.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using MediatR;
|
||||
using ReC.Application.Common.Procedures.UpdateProcedure;
|
||||
using ReC.Application.Common.Procedures.UpdateProcedure.Dto;
|
||||
|
||||
namespace ReC.Application.Profile.Commands;
|
||||
|
||||
public record UpdateProfileCommand : IUpdateProcedure<UpdateProfileDto>
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
public UpdateProfileDto Data { get; set; } = null!;
|
||||
}
|
||||
|
||||
public class UpdateProfileProcedureHandler(ISender sender) : IRequestHandler<UpdateProfileCommand, int>
|
||||
{
|
||||
public async Task<int> Handle(UpdateProfileCommand request, CancellationToken cancel)
|
||||
{
|
||||
return await sender.Send(new UpdateObjectProcedure
|
||||
{
|
||||
Entity = "PROFILE",
|
||||
Id = request.Id,
|
||||
Profile = request.Data
|
||||
}, cancel);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user