public async static Task <IEnumerable <T> > WhereAsync <T>(this IAzureTableStorage <T> tableStorage, IEnumerable <string> partitionKeys, DateTime from, DateTime to, ToIntervalOption intervalOption, Func <T, bool> filter = null) where T : ITableEntity, new() { var result = new List <T>(); await Task.WhenAll( partitionKeys.Select(partitionKey => tableStorage.WhereAsync(partitionKey, from, to, intervalOption, filter) .ContinueWith(task => { lock (result) result.AddRange(task.Result); })) ); return(result); }