// Query input binding
        //   The binding creates a strongly-typed query against the Item table.
        //   The binding does not do anything with the results when the function exits.
        //  This example takes the results of the query and puts them in a queue for further
        //  processing.
        public static async Task EnqueueItemToProcess(
            [TimerTrigger("00:01")] TimerInfo timer,
            [EasyTable] IMobileServiceTableQuery <Item> itemQuery,
            [Queue("ToProcess")] IAsyncCollector <string> queueItems)
        {
            IEnumerable <string> itemsToProcess = await itemQuery
                                                  .Where(i => !i.IsProcessed)
                                                  .Select(i => i.Id)
                                                  .ToListAsync();

            foreach (string itemId in itemsToProcess)
            {
                await queueItems.AddAsync(itemId);
            }
        }
Esempio n. 2
0
 public IAsyncQuery <T> Where(Expression <Func <T, bool> > predicate)
 {
     return(new AsyncQuery <T>(from.Where(predicate)));
 }