public async Task <IHttpActionResult> PutNation(string id, Nation nation) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != nation.ID) { return(BadRequest()); } try { await _SVC.UpdateNation(nation); } catch (DbUpdateConcurrencyException) { if (!NationExists(nation.ID)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
async public Task <ActionResult> Update(Nation item) { return(Content(await _Service.UpdateNation(item))); }