public async Task <IActionResult> PutJogador(int id, Jogador jogador) { if (id != jogador.JogadorId) { return(BadRequest()); } _context.Entry(jogador).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!JogadorExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutTime(int id, Time time) { if (id != time.TimeId) { return(BadRequest()); } _context.Entry(time).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TimeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }