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