示例#1
0
        public HttpResponseMessage BuscarSessao(int id)
        {
            if (id == 0)
            {
                return(Request.CreateResponse(HttpStatusCode.Unauthorized));
            }

            try
            {
                var sessao = movieDAO.BuscarSessao(id);

                return(Request.CreateResponse(HttpStatusCode.OK, sessao));
            }
            catch (Exception)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest));
            }
        }