Interface IAzureDocumentDbHelper
A helper for Azure Document DB.
Namespace: Cqrs.Azure.DocumentDb
Assembly: Cqrs.Azure.DocumentDb.dll
Syntax
public interface IAzureDocumentDbHelper
Methods
CreateOrReadCollection(DocumentClient, Database, String, String[])
Gets a
Declaration
Task<DocumentCollection> CreateOrReadCollection(DocumentClient client, Database database, string collectionName, string[] uniqiueIndexPropertyNames = null)
Parameters
Type | Name | Description |
---|---|---|
DocumentClient | client | The |
Database | database | The |
System.String | collectionName | The name of the collection to get. |
System.String[] | uniqiueIndexPropertyNames | Any unique properties the collection should enforce. |
Returns
Type | Description |
---|---|
Task<DocumentCollection> |
CreateOrReadDatabase(DocumentClient, String)
Gets a
Declaration
Task<Database> CreateOrReadDatabase(DocumentClient client, string databaseName)
Parameters
Type | Name | Description |
---|---|---|
DocumentClient | client | The |
System.String | databaseName | The name of the database to get. |
Returns
Type | Description |
---|---|
Task<Database> |
ExecuteFaultTollerantFunction(Action)
Execute the provided func
in a fault tolerant way.
Declaration
void ExecuteFaultTollerantFunction(Action func)
Parameters
Type | Name | Description |
---|---|---|
Action | func | The |
ExecuteFaultTollerantFunction<T>(Func<T>)
Execute the provided func
in a fault tolerant way.
Declaration
T ExecuteFaultTollerantFunction<T>(Func<T> func)
Parameters
Type | Name | Description |
---|---|---|
Func<T> | func | The |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |