Exemplo n.º 1
0
 public async Task <Evento[]> GetAllEventosByTemaAsync(string tema, bool includePalestrantes)
 {
     try
     {
         return(await _evento.GetAllEventosByTemaAsync(tema, includePalestrantes));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 2
0
        public async Task <Evento[]> GetAllEventosByTemaAsync(string tema, bool includePalestrantes = false)
        {
            try
            {
                var eventos = await _eventoPersistence.GetAllEventosByTemaAsync(tema, includePalestrantes);

                if (eventos == null)
                {
                    return(null);
                }
                return(eventos);
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
Exemplo n.º 3
0
        public async Task <EventoDto[]> GetAllEventosByTemaAsync(string tema, bool includePalestrantes = false)
        {
            try
            {
                var eventos = await _eventoPersist.GetAllEventosByTemaAsync(tema, includePalestrantes);

                if (eventos == null)
                {
                    return(null);
                }

                var eventoDto = _mapper.Map <EventoDto[]>(eventos);
                return(eventoDto);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }