Example #1
0
        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());
        }
Example #2
0
        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));
        }