public static async Task <List <TestDocument> > AddTestDocuments(this IDocumentClient client, string databaseId, string collectionId, RequestOptions requestOptions = null) { var results = new List <TestDocument>(); // create some documents for (var i = 0; i < 10; i++) { var docName = $"TestExample{i}"; var doc = new TestDocument { Number = i, Name = docName }; await client.GetOrCreateDocumentAsync(databaseId, collectionId, doc, requestOptions ?? new RequestOptions { ConsistencyLevel = ConsistencyLevel.Session }); results.Add(doc); } return(results); }