locked
How can I query PartitionKey or RowKey RRS feed

  • Question

  • How do I query a partitionKey or RowKey with  ">" or "<" condition.  If I use LINQ, the compiler thinks that PartitionKey or RowKey is a string and can't use ">" or "<".   The equal "=="  is fine; but another other conditional operand gives me error.

    e.g:

     

     

    var q2= from n in table.CreateQuery<MyData>(sTable)

     

     

    where n.PartitionKey > "2923939343"       <====  Error here 

     

     

    select n;

    Thanks.

    Saturday, October 16, 2010 8:58 AM

Answers

  • Use PartitionKey.CompareTo("X") < 0 or PartitionKey.CompareTo("Y") > 0.

    • Marked as answer by Yi-Lun Luo Friday, October 22, 2010 8:46 AM
    Saturday, October 16, 2010 4:04 PM

All replies