public IHttpActionResult ArchiveGroup(int id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } db.archive_work_group(id); try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!work_groupExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }