示例#1
0
        public async Task <bool> IsBlacklistedAsync(string email)
        {
            var partitionKey = BlacklistedEmailEntity.GeneratePartitionKey();
            var rowKey       = BlacklistedEmailEntity.GenerateRowKey(email);

            return(await _tableStorage.GetDataAsync(partitionKey, rowKey) != null);
        }
示例#2
0
 public async Task AddAsync(string email)
 {
     var newEntity = BlacklistedEmailEntity.Create(email);
     await _tableStorage.InsertOrReplaceAsync(newEntity);
 }