public IHttpActionResult UpdateSupplier(SupplierModel sup) { string error = ""; SupplierModel sm = SupplierRepo.UpdateSupplier(sup, out error); if (error != "" || sm == null) { if (error == ConError.Status.NOTFOUND) { return(Content(HttpStatusCode.NotFound, "Supplier Not Found")); } return(Content(HttpStatusCode.BadRequest, error)); } return(Ok(sm)); }