public async Task <IActionResult> PutAthletes(long id, Athlete Athlete) { if (id != Athlete.Id) { return(BadRequest()); } _context.Entry(Athlete).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AthleteExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutBookingInfos(int id, BookingInfo BookingInfo) { if (id != BookingInfo.Id) { return(BadRequest()); } _context.Entry(BookingInfo).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BookingInfoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }