Exemplo n.º 1
0
 private Task ReadAllEntitiesForPartitionKey(string partitionKey, ConcurrentBag <TOut> listToAddTo)
 {
     return(_tablePool.Execute(async table =>
     {
         await CloudTableHelpers.LoopResultSetAndMap(partitionKey
                                                     , listToAddTo
                                                     , table
                                                     , _mapEntityFunc);
     }));
 }
        public static bool RowExistsForRowKey(this ITablePool <CloudTable> tablePool, string rowKey)
        {
            var        queryFilter = TableQuery.GenerateFilterCondition(RowKeyField, OpEquals, rowKey);
            TableQuery query       = new TableQuery();

            query.SelectColumns = QuerySelectColumnsPartitionKeyRowKeyOnly;
            query.FilterString  = queryFilter;

            return(tablePool.Execute(table =>
            {
                var result = table.ExecuteQuery(query);
                return result.Any();
            }));
        }