コード例 #1
0
        public HttpResponseMessage GetChannelById([FromUri] int id)
        {
            ItemResponse <Channel> response = new ItemResponse <Channel>();

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