UriFactory Class
Updated: June 30, 2017
Helper class to assist in creating the various Uris needed for use with the DocumentClient instance in the Azure DocumentDB database service.
Assembly: Microsoft.Azure.Documents.Client (in Microsoft.Azure.Documents.Client.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | CreateAttachmentUri | Given a database, collection, document, and attachment id, this creates an attachment link. |
![]() ![]() | CreateCollectionUri | Obsolete. Given a database and collection id, this creates a collection link. |
![]() ![]() | CreateConflictUri | Given a database, collection and conflict id, this creates a conflict link. |
![]() ![]() | CreateDatabaseUri | Given a database id, this creates a database link. |
![]() ![]() | CreateDocumentCollectionUri | Given a database and collection id, this creates a collection link. |
![]() ![]() | CreateDocumentUri | Given a database, collection and document id, this creates a document link. |
![]() ![]() | CreatePartitionKeyRangesUri | Given a database and collection, this creates a partition key ranges link in the Azure DocumentDB database service. |
![]() ![]() | CreatePermissionUri | Given a database and user id, this creates a permission link. |
![]() ![]() | CreateStoredProcedureUri | Given a database, collection and stored proc id, this creates a stored proc link. |
![]() ![]() | CreateTriggerUri | Given a database, collection and trigger id, this creates a trigger link. |
![]() ![]() | CreateUserDefinedFunctionUri | Given a database, collection and udf id, this creates a udf link. |
![]() ![]() | CreateUserUri | Given a database and user id, this creates a user link. |
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"});
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

