Skip to content

Instantly share code, notes, and snippets.

@takekazuomi
Created May 17, 2012 02:28
Show Gist options
  • Save takekazuomi/2715762 to your computer and use it in GitHub Desktop.
Save takekazuomi/2715762 to your computer and use it in GitHub Desktop.
AsTableServiceQuery trap
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