View paging-test.cs
[Fact]
public async Task Should_continue_query()
{
// Setup our Database and add a new Customer
var dbSetup = new DatabaseSetup(_client);
await dbSetup.Init(DatabaseId, CollectionId);
var addCustomer1 = new Customer(Guid.NewGuid().ToString(), "Demo1");
await dbSetup.AddCustomer(addCustomer1);
var addCustomer2 = new Customer(Guid.NewGuid().ToString(), "Demo2");
View feedoptions-continue.cs
var options = new FeedOptions
{
MaxItemCount = 100,
RequestContinuation = previousResult.ResponseContinuation
};
var query = client.CreateDocumentQuery<Document>(collection, options).AsDocumentQuery();
View feedoptions.cs
var options = new FeedOptions
{
MaxItemCount = 100
};
var query = client.CreateDocumentQuery<Document>(collection, options).AsDocumentQuery();
View client.cs
using System;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using Microsoft.Azure.Documents;
using Microsoft.Azure.Documents.Client;
using Shouldly;
using Xunit;
namespace Demo
View sproc.js
function sp_demo(customers){
var context = getContext();
var collection = context.getCollection();
var collectionLink = collection.getSelfLink();
for (var x in customers) {
if (!customers[x].Name) throw "Invalid Customer Name";
collection.createDocument(collectionLink, customers[x]);
}
View books-5.json
{
"title": "The Goal: A Process of Ongoing Improvement",
"year": 1992,
"price": 1.45,
"genre": "Business Management",
"stock": 1,
"author": {
"name": "Eliyahu M. Goldratt",
"links": [
{
View books-4.json
{
"title": "The Goal: A Process of Ongoing Improvement",
"year": 1992,
"price": 1.45,
"genre": "Business Management",
"stock": 0,
"author": {
"name": "Eliyahu M. Goldratt",
"links": [
{
View books-3.json
{
"cart": {
"total": 1.45,
"books": [
{
"title": "The Goal: A Process of Ongoing Improvement",
"price": 1.45,
"links": [
{
"rel": "Book",
View books-2.json
{
"title": "The Goal: A Process of Ongoing Improvement",
"year": 1992,
"price": 1.45,
"genre": "Business Management",
"stock": 1,
"author": {
"name": "Eliyahu M. Goldratt",
"links": [
{
View books-1.json
{
"books": [
{
"title": "The Goal: A Process of Ongoing Improvement",
"price": 1.45,
"links": [
{
"rel": "Book",
"href": "/api/books/243"
}