Пример #1
0
 public HttpResponseMessage UpdateOnlineLinkDataModel(int id, [FromBody] OnlineLinkDataModel onlineLinkDataModel)
 {
     if (onlineLinkDataModel == null)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "data with Id = " + id.ToString() + "not found to update"));
     }
     try
     {
         commonGateway.UpdateOnlineLinkDataModel(onlineLinkDataModel);
         return(Request.CreateResponse(HttpStatusCode.OK, onlineLinkDataModel));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
     }
 }