UriFactory.CreateDocumentCollectionUri(String, String) Method

Definition

Given a database and collection id, this creates a collection link.

public static Uri CreateDocumentCollectionUri (string databaseId, string collectionId);
static member CreateDocumentCollectionUri : string * string -> Uri
Public Shared Function CreateDocumentCollectionUri (databaseId As String, collectionId As String) As Uri

Parameters

databaseId
System.String

The database id

collectionId
System.String

The collection id

Returns

System.Uri

A collection link in the format of /dbs/{0}/colls/{1}/ with {0} being a Uri escaped version of the databaseId and {1} being collectionId

Remarks

Would be used when updating or deleting a DocumentCollection, creating a Document, a StoredProcedure, a Trigger, a UserDefinedFunction, or when executing a query with CreateDocumentQuery in Azure Cosmos DB.

Applies to

See also

  • <xref:System.Uri.EscapeUriString(System.String)>