public BetValidation(IDistributedCache distributedCache) { betModel = new BetModel(distributedCache); gamblerValidation = new GamblerValidation(distributedCache); rouletteValidation = new RouletteValidation(distributedCache); gamblerModel = new GamblerModel(distributedCache); rouletteModel = new RouletteModel(distributedCache); }
public CBet(IDistributedCache distributedCache) { betModel = new BetModel(distributedCache); betResultModel = new BetResultModel(distributedCache); gamblerModel = new GamblerModel(distributedCache); rouletteModel = new RouletteModel(distributedCache); gamblingModel = new GamblingModel(distributedCache); betValidation = new BetValidation(distributedCache); gamblingValidation = new GamblingValidation(distributedCache); cGambling = new CGambling(distributedCache); }
public GenericAnswer OpenBet(RuletteModel dataRulette, BetModel dataBet, GamblerModel dataGambler) { GenericAnswer response = new GenericAnswer(); string colorBet = string.Empty; if (dataBet.cashBet > Convert.ToInt32(Enum.Cash.MaxCash)) { response.error = "Supera el monto máximo de apuesta = " + Enum.Cash.MaxCash; return(response); } SqlParameter[] parameters = { new SqlParameter { Value = dataRulette.idRulette, ParameterName = RuletteMapping.idRulette }, new SqlParameter { Value = dataGambler.idGambler, ParameterName = GamblerMapping.idGambler }, new SqlParameter { Value = dataBet.cashBet, ParameterName = BetMapping.cashBet }, new SqlParameter { Value = dataBet.numberBet, ParameterName = BetMapping.numberBet }, new SqlParameter { Value = dataBet.colorBet, ParameterName = BetMapping.colorBet }, }; string messageError = string.Empty; connectionManager.AcctionRun(updateRulette, ref messageError, parameters); if (!string.IsNullOrEmpty(messageError)) { response.error = messageError; response.successful = false; return(response); } response.error = "Apertura Exitosa"; response.entity = dataRulette; response.successful = true; return(response); }
public IActionResult OpenBet([FromBody] RuletteModel entidadRulette, [FromBody] BetModel entidadBet, [FromBody] GamblerModel entidadGambler) { return(Ok(RuletteRepository.OpenBet(entidadRulette, entidadBet, entidadGambler))); }
public CGambling(IDistributedCache distributedCache) { gamblingModel = new GamblingModel(distributedCache); gamblerModel = new GamblerModel(distributedCache); }
public GamblerService(IDistributedCache distributedCache) { gamblerModel = new GamblerModel(distributedCache); gamblerValidation = new GamblerValidation(distributedCache); }