dtretyakov / WindowsAzure

.NET library aimed at managing and querying entities from Windows Azure Storage. It can be used as LINQ to Azure Tables.
MIT License
64 stars 27 forks source link

Predicates are not being applied using ToListAsync() #27

Open jakkaj opened 11 years ago

jakkaj commented 11 years ago

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> ToListAsync Should be changed to :

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

jakkaj commented 11 years ago

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

dtretyakov commented 11 years ago

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