I'm trying to query a table in Windows Azure storage and was initially using the TableQuery.CombineFilters
in the TableQuery<RecordEntity>().Where
function as follows:
TableQuery.CombineFilters(
TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.GreaterThanOrEqual, lowDate),
TableOperators.And,
TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.LessThanOrEqual, lowDate),
TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, entityId)
));
Unfortunately CombineFilters only allows 2 query criteria max. So I'm currently doing this:
var tableQuery = new TableQuery<RecordRowEntity>()
.Where(TableQuery.CombineFilters("PartitionKey", string.Format("(PartitionKey ge '{0}') and (PartitionKey le '{1}') and (RowKey eq '{2}')", low, high, entityId));
Is there any other way of doing it. Am conerned that the way I'm doing it at present is vulnerable to changes in the way the Azure Api works.