예제 #1
0
        public HttpResponseMessage GetAllChannels()
        {
            ItemsResponse <Channel> response = new ItemsResponse <Channel>();

            try
            {
                ChannelService svc      = new ChannelService();
                List <Channel> channels = svc.Channel_SelectAll();
                response.Items = channels;
            }
            catch (System.Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex));
            }
            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }//GetAllChannels