1

Is there a way to query Azure table Storage without linq?

I want to use >=, <=, <, > operattors on strings which of course linq will not allow me to do so.

For. eg: I cannot execute below expression in linq as my PartitionKey is a string.

(PartitionKey ge 'A') and (PartitionKey le 'R')

2 Answers 2

2

You should be able to use something like PartitionKey.CompareTo(…) > 0 in linq. An alternative to linq would be to use a DataServiceQuery<T> and e.g. its AddQueryOption method, but that would leave you with the same limitations.

Sign up to request clarification or add additional context in comments.

Comments

0

I'm not sure why that rest query doesn't work for you. I believe the CompareTo method basically generates that. There is even an example here:

Constructing Filter Strings for the Table Designer
http://msdn.microsoft.com/en-us/library/ff683669.aspx

Note that the Table service does not support wildcard queries, and they are not supported in the Table Designer either. However, you can perform prefix matching by using comparison operators on the desired prefix. The following example returns entities with a LastName property beginning with the letter 'A': LastName ge 'A' and LastName lt 'B'

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.