public HttpResponseMessage GetVideoInfo(int videoId) { try { videoContent response = _business.GetVideoInfo(videoId); return(Request.CreateResponse(HttpStatusCode.OK, response)); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message.ToString())); } }
public videoContent GetVideoInfo(int videoId) { try { videoContent videoInfo = _repository.GetVideoInfo(videoId); return(videoInfo); } catch (Exception) { throw; } }