WindowsAzure icon indicating copy to clipboard operation
WindowsAzure copied to clipboard

Predicates are not being applied using ToListAsync()

Open jakkaj opened this issue 11 years ago • 2 comments

ToListAsync extension does not pass in the correct predicate to provide a filter for List operations.

Example is getting all the items in a particular partition.

Usage: await table.ToListAsync( => _.PartitionKey == partitionKey);

public static Task<List<T>> ToListAsync<T> Should be changed to :

return tableQueryProvider.ExecuteAsync(source.Where(predicate).Expression, cancellationToken) .Then(result => ((IEnumerable<T>)result).ToList(), cancellationToken);

jakkaj avatar Aug 14 '13 00:08 jakkaj

*Also apologies for not doing this as a pull request :)

jakkaj avatar Aug 14 '13 00:08 jakkaj

Thanks, it'll be available in the next version.

dtretyakov avatar Aug 16 '13 08:08 dtretyakov