private async Task <IActionResult> PutSetting(int id, Setting setting) { if (id != setting.Setting_ID) { return(BadRequest()); } _context.Entry(setting).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SettingExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }