Пример #1
0
        public string VipLevelView(Guid id)
        {
            var vipLevel      = _brandQueries.GetVipLevel(id);
            var gameProviders = _gameQueries.GetGameProviders(vipLevel.Brand.Id);

            var data = new
            {
                licensee             = vipLevel.Brand.Licensee.Name,
                brand                = vipLevel.Brand.Name,
                defaultForNewPlayers = vipLevel.Brand.DefaultVipLevelId == vipLevel.Id,
                code        = vipLevel.Code,
                name        = vipLevel.Name,
                rank        = vipLevel.Rank,
                description = vipLevel.Description,
                color       = vipLevel.ColorCode,
                remark      = vipLevel.UpdatedRemark,
                limits      = vipLevel.VipLevelGameProviderBetLimits.Select(x => new
                {
                    currency     = x.Currency.Code,
                    gameProvider = gameProviders.Single(y => y.Id == x.GameProviderId).Name,
                    betLimit     = _gameQueries.GetBetLimitDto(x.BetLimitId).Name
                }).OrderBy(x => x.betLimit)
            };

            return(SerializeJson(data));
        }