public override async Task HandleCore(ExcluirPatrimonioCommand request, CancellationToken cancellationToken)
        {
            var patrimonio = await _patrimonioRepository.ObterPorIdAsync(request.TomboNumero);

            patrimonio.Excluir();

            await _patrimonioRepository.ExcluirAsync(patrimonio);
        }
Пример #2
0
        public override async Task HandleCore(AlterarPatrimonioCommand request, CancellationToken cancellationToken)
        {
            var patrimonio = await _patrimonioRepository.ObterPorIdAsync(request.TomboNumero);

            patrimonio.AlterarInformacoesCadastrais(request.Nome, request.Descricao);
        }