title: DocumentDB Stored Procedure Continuation
body: <p>I'm trying out DocumentDB as a possible data store for a new application. The app has to handle a lot of data so I used the Data Migration tool to put a lot of documents into a collection.</p>
  
  <p>Most of the queries from my app will be aggregating and summing. So I'm using documentdb-lumenize. The <a href="https://github.com/lmaccherone/documentdb-lumenize" rel="nofollow">code sample</a> for calling that stored procedure from C# has me doing something like this:</p>
  
  <pre><code>var configString = @"{
          cubeConfig: {
              groupBy: 'year',
              field: 'Amount',
              f: 'sum'
          },
          filterQuery: 'SELECT * FROM TestLargeData t'
      }";
  
  var config = JsonConvert.DeserializeObject&lt;object&gt;(configString);
  var result = await _client.ExecuteStoredProcedureAsync&lt;dynamic&gt;("my/sproc/link", config);
  </code></pre>
  
  <p>The result I get back looks like this:</p>
  
  <pre><code>{
    "cubeConfig": {
      "groupBy": "year",
      "field": "Amount",
      "f": "sum"
    },
    "filterQuery": "SELECT * FROM TestLargeData t",
    "continuation": "-RID:rOtjAPc4TgBxFwAAAAAAAA==#RT:6#TRC:6000",
    "stillQueueing": false,
    "savedCube": {
      "config": {
        "groupBy": "year",
        "field": "Amount",
        "f": "sum"
      },
      "cellsAsCSVStyleArray": [
        [
          "year",
          "_count",
          "Amount_sum"
        ],
        [
          2006,
          4825,
          1391399555.74
        ],
        [
          2007,
          1175,
          693886378
        ]
      ],
      "summaryMetrics": {}
    },
    "example": {
      "year": 2007,
      "SomeOtherField1": "SomeOtherValue1",
      "SomeOtherField2": "SomeOtherValue2",
      "Amount": 12000,
      "id": "0ee80b66-7fa7-40c1-9124-292c01059562",
      "_rid": "...",
      "_self": "...",
      "_etag": "\"...\"",
      "_attachments": "attachments/",
      "_ts": ...
    }
  }
  </code></pre>
  
  <p>The _count values indicate that I got back 6,000 documents worth of aggregated data. There are a million documents in the collection (I wanted to test big!)</p>
  
  <p>I see the "continuation" value in the result. But StoredProcedureResponse doesn't have an ExecuteNextAsync method like the DocumentQuery class does. How would I use the DocumentDB API to request the next part of the data?</p>