Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Updated to fix issue with creating Database and DocumentCollection #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ private async Task GetStartedDemo()
// Create a new instance of the DocumentClient
this.client = new DocumentClient(new Uri(EndpointUrl), AuthorizationKey);

await this.CreateDatabaseIfNotExists("FamilyDB");

await this.CreateDocumentCollectionIfNotExists("FamilyDB", "FamilyCollection");
await this.client.CreateDatabaseIfNotExistsAsync(new Database { Id = "FamilyDB_oa" });
await this.client.CreateDocumentCollectionIfNotExistsAsync(UriFactory.CreateDatabaseUri("FamilyDB_oa"), new DocumentCollection { Id = "FamilyCollection_oa" });

// Insert a document, here we create a Family object
Family andersenFamily = new Family
Expand Down