Esempio n. 1
0
        public async Task <IReadOnlyList <IMarkup> > GetByIdentityAsync(MarkupIdentityType identityType, string identity)
        {
            IEnumerable <AzureIndex> indecies =
                await _indexByIdentity.GetDataAsync(
                    MarkupEntity.IndexByIdentity.GeneratePartitionKey(identityType, identity));

            IEnumerable <MarkupEntity> entities = await _tableStorage.GetDataAsync(indecies);

            return(Mapper.Map <IEnumerable <Core.Domain.Markup.Markup> >(entities).ToList());
        }
Esempio n. 2
0
        public async Task <IMarkup> GetByIdentityAsync(MarkupIdentityType identityType, string identity, string assetPairId)
        {
            AzureIndex index = await _indexByIdentity.GetDataAsync(
                MarkupEntity.IndexByIdentity.GeneratePartitionKey(identityType, identity),
                MarkupEntity.IndexByIdentity.GenerateRowKey(assetPairId));

            if (index == null)
            {
                return(null);
            }

            MarkupEntity entity = await _tableStorage.GetDataAsync(index);

            return(Mapper.Map <Core.Domain.Markup.Markup>(entity));
        }