How can I set multiple filters on a Azure Table Storage?
This is what I\'ve tried:
string partitionFilter = TableQuery.GenerateFilterCondition(\"Partitio
I am using Windows Azure Storage 7.0.0 and you can use Linq query so that you don't need to combine filters anymore:
// filter dates for test
var startDate = DateTime.Parse("01/02/2016 12:00:00 AM");
var endDate = DateTime.Parse("02/02/2016 12:00:00 AM");
// Get the cloud table
var cloudTable = GetCloudTable();
// Create a query: in this example I use the DynamicTableEntity class
var query = cloudTable.CreateQuery()
.Where(d => d.PartitionKey == "partition1"
&& d.Timestamp >= startDate && d.Timestamp <= endDate);
// Execute the query
var result = query.ToList();
Here is the generated query :
((PartitionKey eq 'partition1') and (Timestamp ge datetime'2016-01-31T11:00:00Z')) and (Timestamp le datetime'2016-02-01T11:00:00Z')
You can notice that: