Class CosmosRepositoryOptions<T>
Configuration options for a repository.
Inherited Members
Namespace: Benday.CosmosDb.Repositories
Assembly: Benday.CosmosDb.dll
Syntax
public class CosmosRepositoryOptions<T>
Type Parameters
| Name | Description |
|---|---|
| T | Domain model type managed by the repository |
Properties
| Edit this page View SourceConnectionString
Connection string for the Cosmos DB account.
Declaration
public string? ConnectionString { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ContainerName
Name of the container in the Cosmos DB database.
Declaration
public string ContainerName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DatabaseName
Cosmos DB database name.
Declaration
public string DatabaseName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DatabaseThroughput
Throughput for the database. This is only used if the database is created.
Declaration
public int DatabaseThroughput { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
PartitionKey
Partition key configuration for the Cosmos DB container.
Declaration
public string PartitionKey { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
UseDefaultAzureCredential
Declaration
public bool UseDefaultAzureCredential { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
UseHierarchicalPartitionKey
Use hierarchical partition key. This option is disabled by default.
Declaration
public bool UseHierarchicalPartitionKey { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
WithCreateStructures
Configure whether to create Cosmos DB structures if they don't already exists. This option is disabled by default.
Declaration
public bool WithCreateStructures { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |