public async Task <IActionResult> AlterarNomeDoPatrimonio(long tomboNumero, [FromBody] AlteracaoInformacoesCadastraisDoPatrimonioInput request) { var cmd = new CriarPatrimonioCommand(tomboNumero, request.Nome, request.Descricao); await _mediator.Send(cmd); await _uow.SaveEntitiesAsync(); return(Ok()); }
public async Task <IActionResult> CriarPatrimonio([FromBody] CriacaoPatrimonioInput request) { var cmd = new CriarPatrimonioCommand(request.ModeloId, request.Nome, request.Descricao); var resultado = await _mediator.Send(cmd); await _uow.SaveEntitiesAsync(); return(Ok(resultado)); }