Esempio n. 1
0
        public List <TUR_TurmaHorarioDTO> GetAll()
        {
            try
            {
                List <TUR_TurmaHorarioDTO> dto = TUR_TurmaHorarioBO.SelecionarTurmaHorario();

                if (dto != null && dto.Count > 0)
                {
                    return(dto);
                }
            }
            catch (Exception e)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.InternalServerError)
                {
                    Content = new StringContent("Erro: " + e.Message)
                });
            }

            throw new HttpResponseException(HttpStatusCode.NotFound);
        }