public async Task <IEnumerable <ILogItem> > GetRange(DateTime dateFrom, DateTime dateTo, string clientId) { DateTime startDate = dateFrom.Date; DateTime endDate = dateTo.Date.AddDays(1); DateTime currentDate = startDate; List <LogEntity> retval = new List <LogEntity>(); do { string partitionKey = LogEntity.GetPartitionKey(clientId, currentDate); var entities = (await _storage.GetDataAsync(new[] { partitionKey }, int.MaxValue)) .OrderByDescending(item => item.Timestamp); retval.AddRange(entities); currentDate = currentDate.AddDays(1); } while (currentDate < endDate); //var entities = (await _storage.GetDataAsync(new[] { clientId }, int.MaxValue, // entity => entity.Timestamp >= dateFrom && entity.Timestamp < dateTo)) // .OrderByDescending(item => item.Timestamp); return(retval.Select(LogEntity.CreateDto)); }