public string BetLimits(Guid gameProviderId, Guid brandId) { var limits = _gameQueries.GetBetLimits(gameProviderId, brandId).OrderBy(x => x.Name); return(SerializeJson(new { BetLimits = limits })); }
public IHttpActionResult BetLevels(Guid brandId, Guid productId) { var data = new BrandProductSettingsData { BetLevels = _gameQueries .GetBetLimits(productId, brandId) .Select(x => new BetLevelData { Id = x.Id, Code = x.LimitId, Name = x.Name, Description = x.Description }).ToArray() }; return(Ok(new { Setting = data, Currencies = _brandQueries.GetCurrenciesByBrand(brandId).Select(x => x.Code) })); }
public string BetLimitData(Guid?brandId) { if (!brandId.HasValue) { return(SerializeJson(new { Currencies = new object[] { }, GameProviders = new object[] { } })); } var data = new { Currencies = _brandQueries.GetCurrenciesByBrand(brandId.Value).OrderBy(x => x.Code).Select(x => new { x.Code }), GameProviders = _gameQueries.GetGameProviders(brandId.Value).Where(x => _gameQueries.GetBetLimits(x.Id, brandId.Value).Any()) }; return(SerializeJson(data)); }