public async Task <IActionResult> PutBetGame(Guid id, BetGame betGame) { if (id != betGame.Id) { return(BadRequest()); } _context.Entry(betGame).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BetGameExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <Roulette> > PostRoulette(Roulette roulette) { _context.Roulette.Add(roulette); await _context.SaveChangesAsync(); return(CreatedAtAction("GetRoulette", new { id = roulette.Id }, "Roulette Id " + roulette.Id)); }