public Task BetOnRoulette(DTOBet bet, string user) { var newBet = new Bet( rouletteId: bet.RouletteId, user: user, amount: bet.BetAmount, betNumber: bet.BetNumber, betColor: bet.BetColor.ToString() ); var state = rouletteRepository.GetRouletteStateById(rouletteId: newBet.GetRouletteId()); if (state == RouletteStates.inactive) { throw new HttpResponseException("La ruleta ingresada no se encuentra activa."); } return(rouletteRepository.CreateBetOnRoulette(newBet: newBet)); }