public HttpResponseMessage UpdateSmallTextListDataModel(int id, [FromBody] SmallTextListDataModel smallTextListDataModel) { if (smallTextListDataModel == null) { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "data with Id = " + id.ToString() + "not found to update")); } try { commonGateway.UpdateSmallTextListDataModel(smallTextListDataModel); return(Request.CreateResponse(HttpStatusCode.OK, smallTextListDataModel)); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex)); } }