public async Task <List <FailedAttempt> > FindFailedAttemptsForIpAddressAsync(string ipAddress, DateTimeOffset newerThan) { var query = _storageQuery .Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, ipAddress)) .And(TableQuery.GenerateFilterCondition("RowKey", QueryComparisons.GreaterThan, newerThan.Ticks.ToString())); var ipAddresses = await _storageClient.RunQueryAsync(query); return(ipAddresses.Select(ip => new FailedAttempt( ip.PartitionKey, ip.Timestamp) ).ToList()); }
public Task <IEnumerable <WhitelistEntity> > FindAllByEmailAsync(string emailaddress) { var query = _storageQuery .Where(TableQuery.GenerateFilterCondition(nameof(WhitelistEntity.EmailAddress), QueryComparisons.Equal, emailaddress)); return(_storageClient.RunQueryAsync(query)); }