public HttpResponseMessage UpdateChannel([FromUri] int id, [FromBody] Channel model) { if (!ModelState.IsValid) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ModelState)); } try { ChannelService svc = new ChannelService(); svc.Channel_UpdateById(model); } catch (System.Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex)); } return(Request.CreateResponse(HttpStatusCode.OK, new SuccessResponse())); } //UpdateChannel