예제 #1
0
        public async Task <bool> IsEmailRegistered(string email)
        {
            if (IsEmailRegisteredFromCache(email))
            {
                return(true);
            }

            var patitionKey = Lkk2YOrderMadeIndexEntity.GeneratePartitionKey();
            var rowKey      = Lkk2YOrderMadeIndexEntity.GenerateRowKey(email);


            var entity = await _tableStorageOrderIndex.GetDataAsync(patitionKey, rowKey);

            var result = entity != null;

            if (result)
            {
                AddToCache(email);
            }

            return(result);
        }
예제 #2
0
 private async Task AddToIndexAsync(string email)
 {
     var newEntity = Lkk2YOrderMadeIndexEntity.Create(email);
     await _tableStorageOrderIndex.InsertOrReplaceAsync(newEntity);
 }