title: Use TableContinuationToken as bookmark
body: <p>This query taken from <a href="http://lockmedown.com/be-sure-with-azure-net-azure-table-storage-part-2/#queries" rel="nofollow noreferrer">here</a> is quite straight forward: </p>
  
  <pre><code>TableContinuationToken token = null;
  List&lt;Footwear&gt; shoes = new List&lt;Footwear&gt;();
  
  do
  {
    TableQuerySegment&lt;Footwear&gt; queryResult = query.ExecuteSegmented(token);
    token = queryResult.ContinuationToken;
    shoes.AddRange(queryResult.Results);
  } while (token != null);
  </code></pre>
  
  <p>Once null is returned the while loop finishes. Is it possible to store the last TableContinuationToken and then check after a while if there is more Footwear entered after the last TableContinuationToken. To create 'order' I use <a href="http://blog.liamcavanagh.com/2011/11/how-to-sort-azure-table-store-results-chronologically/" rel="nofollow noreferrer">this approach</a>.  </p>
  
  <p>PS:</p>
  
  <p>I hope the following provides a bit more context. I currently store instances of this class:</p>
  
  <pre><code>public class SomeClass : TableEntity
  {
      public long Ticks { get; set; }
      public SomeClass(){}
  
      public SomeClass(string partitionKey)
      {
          PartitionKey = partitionKey;
          Ticks = DateTime.UtcNow.Ticks - DateTime.MinValue.Ticks;
          // rowkey + partition = guid/pk
          // used to order events at the other end - very important  
          RowKey = (DateTime.UtcNow.Ticks - DateTime.MinValue.Ticks).ToString();
      }
  }
  </code></pre>
  
  <p>in Azure table storage. To create a rowkey like this allows me to sort entities like so:</p>
  
  <pre><code>var query =
  (from s in _table.CreateQuery&lt;SomeClass&gt;()
  where
  s.PartitionKey == _partitionKey &amp;&amp;
  string.Compare(s.RowKey, rowKeyToUse, StringComparison.Ordinal) &gt; 0 
  select s).AsTableQuery(); 
  </code></pre>
  
  <p>from time to time I want to check if there are new entities. I do not think I can use the rowkey for this (see also <a href="https://stackoverflow.com/questions/35628273/query-rowkey-with-greater-than-in-azure-table-storage">here</a>). So currently I store the latest Ticks of the last entity in the process that consumes the table storage. I can use this query to pull for new entities:</p>
  
  <pre><code> var query =
    (from s in _table.CreateQuery&lt;SomeClass&gt;()
     where
     storedEvent.PartitionKey == _partitionKey &amp;&amp;
     storedEvent.Ticks &gt; _ticks &amp;&amp; // only above last threshold
     string.Compare(s.RowKey, rowKeyToUse, StringComparison.Ordinal) &gt; 0 
     select s).AsTableQuery();
  </code></pre>
  
  <p>So in a nutshell - this is what I want to achieve:</p>
  
  <p>(1) Page over all entities until token = null. 
  (2) 'Pull' the table storage. If there are new entities loop until token = null.
  (3) Repeat (2)</p>
  
  <p>I am after the simplest and most robust approach. Currently I am using the Ticks approach described above. However, this feels wrong as the same information is already stored in the rowkey as string. I hope this makes sense.   </p>