コード例 #1
0
ファイル: EventoService.cs プロジェクト: bisslee/ProEventos
 public async Task <Evento[]> GetAllEventosAsync(bool includePalestrantes = false)
 {
     try
     {
         return(await _evento.GetAllEventosAsync(includePalestrantes));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
ファイル: EventoService.cs プロジェクト: fumacapg/ProEventos
        public async Task <Evento[]> GetAllEventosAsync(bool includePalestrantes = false)
        {
            try
            {
                var eventos = await _eventoPersistence.GetAllEventosAsync(includePalestrantes);

                if (eventos == null)
                {
                    return(null);
                }
                return(eventos);
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
        }
コード例 #3
0
ファイル: EventoService.cs プロジェクト: LucasMGS/ProEventos
        public async Task <EventoDto[]> GetAllEventosAsync(bool includePalestrantes = false)
        {
            try
            {
                var eventos = await _eventoPersist.GetAllEventosAsync(includePalestrantes);

                if (eventos == null)
                {
                    return(null);
                }
                var eventosDto = new List <EventoDto>();

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