public async Task <IActionResult> PutHeadStaffs(int id, HeadStaffs headStaffs) { if (id != headStaffs.HeadStaffId) { return(BadRequest()); } _context.Entry(headStaffs).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!HeadStaffsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutScouts(int id, Scouts scouts) { if (id != scouts.ScoutId) { return(BadRequest()); } _context.Entry(scouts).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ScoutsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPlayer(int id, Player player) { if (id != player.PlayerId) { return(BadRequest()); } _context.Entry(player).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PlayerExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }