UriFactory Class

Definition

Helper class to assist in creating the various Uris needed for use with the DocumentClient instance in the Azure Cosmos DB service.

public static class UriFactory
type UriFactory = class
Public Class UriFactory
Inheritance
UriFactory

Examples

The example below uses UriFactory to create a DocumentCollectionLink and then uses that to create a Document.

Uri collUri = UriFactory.CreateDocumentCollectionUri("MyDb", "MyCollection");
var doc = await client.CreateDocumentAsync(collUri, new {id = "MyDoc"});

Methods

CreateAttachmentUri(String, String, String, String)

Given a database, collection, document, and attachment id, this creates an attachment link.

CreateCollectionUri(String, String)
Obsolete.

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

CreateConflictUri(String, String, String)

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

CreateDatabaseUri(String)

Given a database id, this creates a database link.

CreateDocumentCollectionUri(String, String)

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

CreateDocumentUri(String, String, String)

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

CreatePartitionKeyRangesUri(String, String)

Given a database and collection, this creates a partition key ranges link in the Azure Cosmos DB service.

CreatePermissionUri(String, String, String)

Given a database and user id, this creates a permission link.

CreateStoredProcedureUri(String, String, String)

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

CreateTriggerUri(String, String, String)

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

CreateUserDefinedFunctionUri(String, String, String)

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

CreateUserUri(String, String)

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

Applies to