Exemplo n.º 1
0
        public async Task <ServiceResponse <List <ObterParticipanteDto> > > Obter()
        {
            var sr = new ServiceResponse <List <ObterParticipanteDto> >();

            try
            {
                var listaParticipante = await _participanteRepository.Obter();

                sr.Value = _mapper.Map <List <ObterParticipanteDto> >(listaParticipante);
            }
            catch (Exception ex)
            {
                sr.Sucess = false;
                sr.Messages.Add(ex.Message);
            }
            return(sr);
        }