Exemplo n.º 1
0
        public async Task Remover(int id)
        {
            var model = _participanteRepo.GetById(id);

            if (model == null)
            {
                throw new NotFoundException("App.Services.ParticipanteAppService Remover", id);
            }

            await _participanteService.Remover(model);
        }
Exemplo n.º 2
0
        private bool ParticipanteExistente(Guid Id, string messageType)
        {
            Participante participante = _participanteRepository.GetById(Id);

            if (participante != null)
            {
                return(true);
            }

            _bus.RaiseEvent(new DomainNotification(messageType, "Participante não encontrado"));
            return(false);
        }
Exemplo n.º 3
0
 public ParticipanteViewModel GetById(Guid id)
 {
     return(_mapper.Map <ParticipanteViewModel>(_participanteRepository.GetById(id)));
 }