Created
May 17, 2012 02:28
-
-
Save takekazuomi/2715762 to your computer and use it in GitHub Desktop.
AsTableServiceQuery trap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void CloudTableQuery001(CloudTableClient tables, string tableName) | |
{ | |
var context = GetTableServiceContext(tables); | |
// query is instance of CloudTableQuery | |
var query1 = context.CreateQuery<EntityOne>(tableName).AsTableServiceQuery(); | |
logger.Info(m=>m("{0}\t{1}", query1 is CloudTableQuery<EntityOne>, query1.GetType().Name)); | |
// now DataServiceOrderedQuery | |
var query2 = query1.Where(e => e.PartitionKey.CompareTo("00000000") > 0); | |
logger.Info(m => m("{0}\t{1}", query2 is CloudTableQuery<EntityOne>, query2.GetType().Name)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment