示例#1
0
        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());
        }
示例#2
0
 public async Task <IActionResult> UpdateCategory(
     [FromBody] UpdateCategory.Request request,
     [FromServices] UpdateCategory updateCategory) =>
 Ok((await updateCategory.DoAsync(request)));