public async Task <bool> CheckTradableAsync(string clientId, string lykkeEntityId1, string lykkeEntityId2)
        {
            ILykkeEntity lykkeEntity1 = await _redisService.GetLykkeEntityAsync(lykkeEntityId1);

            if (lykkeEntity1 == null)
            {
                throw new LykkeEntityNotFoundException(lykkeEntityId1);
            }

            ILykkeEntity lykkeEntity2 = await _redisService.GetLykkeEntityAsync(lykkeEntityId2);

            if (lykkeEntity2 == null)
            {
                throw new LykkeEntityNotFoundException(lykkeEntityId2);
            }

            ILykkeEntity lykkeEntity = lykkeEntity1.Priority > lykkeEntity2.Priority ? lykkeEntity1 : lykkeEntity2;

            return(await CheckDisclaimerAsync(clientId, lykkeEntity.Id, DisclaimerType.Tradable));
        }
        public async Task <IDisclaimer> AddAsync(IDisclaimer disclaimer)
        {
            ILykkeEntity lykkeEntity = await _redisService.GetLykkeEntityAsync(disclaimer.LykkeEntityId);

            if (lykkeEntity == null)
            {
                throw new LykkeEntityNotFoundException(disclaimer.LykkeEntityId);
            }

            IDisclaimer createdDisclaimer = await _disclaimerRepository.InsertAsync(disclaimer);

            await _redisService.AddDisclaimerAsync(createdDisclaimer);

            _log.Info("Lykke entity disclaimer added", disclaimer);

            return(createdDisclaimer);
        }
 public Task <ILykkeEntity> GetAsync(string lykkeEntityId)
 {
     return(_redisService.GetLykkeEntityAsync(lykkeEntityId));
 }