public async Task <ActionResult <RaceQueue> > PostRaceQueue(RaceQueue raceQueue) { _context.RaceQueue.Add(raceQueue); await _context.SaveChangesAsync(); return(CreatedAtAction("GetRaceQueue", new { id = raceQueue.Id }, raceQueue)); }
public async Task <IActionResult> PutRaceQueue(int id, RaceQueue raceQueue) { if (id != raceQueue.Id) { return(BadRequest()); } _context.Entry(raceQueue).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RaceQueueExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }