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:
@@ -42,7 +42,7 @@ public class RecActionController(IMediator mediator) : ControllerBase
|
||||
/// <returns>An HTTP 201 Created response.</returns>
|
||||
[HttpPost]
|
||||
[ProducesResponseType(StatusCodes.Status201Created)]
|
||||
public async Task<IActionResult> Create([FromBody] InsertActionProcedure command, CancellationToken cancel)
|
||||
public async Task<IActionResult> Create([FromBody] InsertActionCommand command, CancellationToken cancel)
|
||||
{
|
||||
await mediator.Send(command, cancel);
|
||||
|
||||
@@ -57,7 +57,7 @@ public class RecActionController(IMediator mediator) : ControllerBase
|
||||
/// <returns>No content on success.</returns>
|
||||
[HttpPut("{id:long}")]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
public async Task<IActionResult> Update([FromBody] UpdateActionProcedure procedure, CancellationToken cancel)
|
||||
public async Task<IActionResult> Update([FromBody] UpdateActionCommand procedure, CancellationToken cancel)
|
||||
{
|
||||
await mediator.Send(procedure, cancel);
|
||||
return NoContent();
|
||||
@@ -71,7 +71,7 @@ public class RecActionController(IMediator mediator) : ControllerBase
|
||||
/// <returns>An HTTP 204 No Content response upon successful deletion.</returns>
|
||||
[HttpDelete]
|
||||
[ProducesResponseType(StatusCodes.Status204NoContent)]
|
||||
public async Task<IActionResult> Delete([FromBody] DeleteActionProcedure procedure, CancellationToken cancel)
|
||||
public async Task<IActionResult> Delete([FromBody] DeleteActionCommand procedure, CancellationToken cancel)
|
||||
{
|
||||
await mediator.Send(procedure, cancel);
|
||||
return NoContent();
|
||||
|
||||
Reference in New Issue
Block a user