I'm using Azure Table Storage. When I query a table that is empty with parameters other than PartitionKey and RowKey involved, I get an exception. When I have at least one row, the exception doesn't appear. If I query the empty table with just PartitionKey and RowKey, it is OK.
I certainly do not want to make an extra round trip to test if the table is empty. How do people normally solve this problem? Is there a performant way to quickly check if the table is empty?
I am using the development storage, as I just saw there are reported errors in this scenario with the development storage and the error goes away in production. However, I do not want to keep customized code just for development storage, is there a good way to get around this, so I could have the same code running local as well as in production cloud environment?
I've got this around by setting DataServiceContext.IgnoreResoureNotFoundException property to true. Hope this helps others too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With