public async Task <ActionResult> Put(Guid id, [FromBody] UpdateCategory.Request request) { request.Id = id; var response = await _mediator.Send(request); if (response == null) { return(NotFound()); } return(NoContent()); }
public async Task <IActionResult> UpdateCategory( [FromBody] UpdateCategory.Request request, [FromServices] UpdateCategory updateCategory) => Ok((await updateCategory.DoAsync(request)));