public async Task <IActionResult> PutPlayers(int id, Players players) { if (id != players.Pid) { return(BadRequest()); } _context.Entry(players).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PlayersExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutLogin(int id, Login login) { if (id != login.Lid) { return(BadRequest()); } _context.Entry(login).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LoginExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }