Ejemplo n.º 1
0
        public void Handle(ExcluirPropostasCommand message)
        {
            if (!PropostaExistente(message.Id, message.MessageType))
            {
                return;
            }
            var clienteAtual = _propostasRepository.ObterPorId(message.Id);

            clienteAtual.ExcluirCliente();

            _propostasRepository.Atualizar(clienteAtual);

            if (Commit())
            {
                _bus.RaiseEvent(new ClienteExcluidoEvent(message.Id));
            }
        }
Ejemplo n.º 2
0
 public PropostasViewModel ObterPorId(Guid id)
 {
     return(_mapper.Map <PropostasViewModel>(_propostasRepository.ObterPorId(id)));
 }