Skip to content

MJCZone.DapperMatic.AspNetCore.Repositories ​

Assembly: MJCZone.DapperMatic.AspNetCore

Classes ​

NameDescription
DapperMaticDatasourceRepositoryBaseBase class for datasource repositories: connection strings are encrypted with the configured key, each tagged with the id of the key that encrypted it, so that keys can be rotated.
DatabaseDapperMaticAccessRepositoryKeeps policies and tenants in a database table, one row each, as JSON: every instance of the application reads the same ones. The table is created when first used.
DatabaseDapperMaticDatasourceRepositoryDatabase-based implementation of IDapperMaticDatasourceRepository that stores datasources in a database table with encrypted connection strings.
DatabaseDapperMaticKeyRepositoryKeeps API keys in a database table, one row each (their secrets only as hashes): every instance of the application reads the same ones. The table is created when first used.
FileDapperMaticAccessRepositoryKeeps policies and tenants in a JSON file, written whole and atomically on each change. Several processes may read the file; one should write it.
FileDapperMaticDatasourceRepositoryFile-based implementation of IDapperMaticDatasourceRepository that stores datasources in a JSON file with encrypted connection strings: <c>{ "datasources": [ ... ] }</c>, written whole on each change.
FileDapperMaticKeyRepositoryKeeps API keys in a JSON file (their secrets only as hashes): for a single instance that keeps its access in a file.
InMemoryDapperMaticAccessRepositoryKeeps policies and tenants in memory, for the life of the process: the default.
InMemoryDapperMaticKeyRepositoryKeeps API keys in memory: lost when the application stops, and not shared by its instances. For tests and development.

Interfaces ​

NameDescription
IDapperMaticAccessRepositoryKeeps the policies and tenants edited at runtime through DapperMatic's access endpoints, alongside those given in code and configuration: in memory (the default), in a file, or in a database table.
IDapperMaticDatasourceRepositoryRepository for managing DapperMatic database datasource registrations. Provnamees secure storage where connection strings can be added/updated but never retrieved after insertion.
IDapperMaticKeyRepositoryKeeps API keys: their secrets only as hashes. Keys are looked up one at a time, by id, as requests sign in, so they are kept apart from the policies and tenants (which every instance reads whole): in memory, in a file, or in a database table.