Пример #1
0
        public HttpResponseMessage GetChannelByTitle([FromUri] string title)
        {
            ItemResponse <Channel> response = new ItemResponse <Channel>();

            try
            {
                ChannelService svc     = new ChannelService();
                Channel        channel = svc.Channel_SelectByTitle(title);
                response.Item = channel;
            }
            catch (System.Exception ex)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex));
            }
            return(Request.CreateResponse(HttpStatusCode.OK, response));
        } //GetChannelByTitle