// PUT api/Countries/{id} public IHttpActionResult Put(int id, [FromBody] Country value) { try { db.Edit(id, value); } catch (Exception ex) { ModelState.AddModelError(nameof(Country), ex.Message); return(BadRequest(ModelState)); } return(Ok()); }
// PUT api/Countries/{id} public IHttpActionResult Put(int id, [FromBody] Country value) { try { db.Edit(id, value); } catch (Exception ex) { ModelState.AddModelError(nameof(Country), ex.Message); return(BadRequest(ModelState)); } return(Ok()); }