public async Task OneTimeSetUp() { _client = new DocumentClient(new Uri("https://localhost:8081"), "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=="); var database = await _client.CreateDatabaseIfNotExistsAsync(new Microsoft.Azure.Documents.Database { Id = "CosmosSelectManyRepro" }); _database = database.Resource; var collection = await _client.CreateDocumentCollectionIfNotExistsAsync(_database.SelfLink, new Microsoft.Azure.Documents.DocumentCollection { Id = "Documents" }); _collection = collection.Resource; await _client.UpsertDocumentAsync(_collection.SelfLink, BobContainer); await _client.UpsertDocumentAsync(_collection.SelfLink, KristineContainer); }
public async Task <IAccount> AddAsync(Microsoft.Azure.Documents.Database database) { await Client.CreateDatabaseAsync(database); return(this); }
public IAccount Add(Microsoft.Azure.Documents.Database database) { return(Helpers.Synchronize(this.AddAsync(database))); }
public async Task <IDatabase> CreateAsync(Microsoft.Azure.Documents.Database database) { this.Id = (await Client.CreateDatabaseIfNotExistsAsync(database, _requestOptions)).Resource.Id; return(this); }
public IDatabase Create(Microsoft.Azure.Documents.Database database) { return(Helpers.Synchronize(this.CreateAsync(database))); }
public DocumentDBContext() { var database = new Microsoft.Azure.Documents.Database(); }