Skip to content

DapperMaticOptions

Namespace: MJCZone.DapperMatic.AspNetCore

Assembly: MJCZone.DapperMatic.AspNetCore

Summary

Options for configuring DapperMatic ASP.NET Core integration.

sealed public

Contents

Constructors (1) | Methods (4) | Properties (8)

Constructors

DapperMaticOptions

csharp
DapperMaticOptions()

Methods

GetType

csharp
GetType()

ToString

csharp
ToString()

Equals

csharp
Equals()

GetHashCode

csharp
GetHashCode()

Properties

BasePath

Gets or sets the base path for DapperMatic API endpoints. Default is "/api/dm".

Type: string

RequireAuthentication

Gets or sets a value indicating whether gets or sets whether to require authentication for DapperMatic endpoints. Default is false (no authentication required).

Type: bool?

RequireRole

Gets or sets the required role for DapperMatic operations.

Type: string?

ReadOnlyRole

Gets or sets the required role for read-only operations (e.g., "get" operations). If not set, read-only operations will use the same role as other operations. Users with the main role can perform all operations regardless of this setting.

Type: string?

EnableCors

Gets or sets a value indicating whether gets or sets whether to enable CORS for DapperMatic endpoints. Default is false.

Type: bool?

CorsPolicyName

Gets or sets the CORS policy name to use for DapperMatic endpoints. Only used if EnableCors is true.

Type: string?

Datasources

Gets the list of datasources to register during startup.

Type: List<DatasourceDto>

ConnectionStringEncryptionKey

Gets or sets the encryption key used to encrypt connection strings in persistent storage. If not provided, connection strings will be stored in plain text (not recommended for production). Should be a base64-encoded 256-bit key for AES encryption.

Type: string?