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); }
private async Task AddToIndexAsync(string email) { var newEntity = Lkk2YOrderMadeIndexEntity.Create(email); await _tableStorageOrderIndex.InsertOrReplaceAsync(newEntity); }