Skip to content

DatabaseDapperMaticAccessRepository ​

Namespace: MJCZone.DapperMatic.AspNetCore.Repositories

Assembly: MJCZone.DapperMatic.AspNetCore

Summary ​

Keeps 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.

Inheritance ​

Implemented Interfaces:

public

Contents ​

Constructors (1) | Methods (14)

Constructors ​

DatabaseDapperMaticAccessRepository ​

Initializes a new instance of the DatabaseDapperMaticAccessRepository class.

csharp
DatabaseDapperMaticAccessRepository(
    string provider,
    string connectionString,
    IDbConnectionFactory connectionFactory,
    string schemaName,
    string tableName)

Parameters ​

  • provider (string) - The database provider.
  • connectionString (string) - The connection string.
  • connectionFactory (IDbConnectionFactory) - The connection factory.
  • schemaName (string) - The schema of the table, or null for the default one.
  • tableName (string) - The table's name.

Methods ​

MethodSummary
GetAsync
SavePolicyAsync
DeletePolicyAsync
SaveTenantAsync
DeleteTenantAsync
SaveWebhookAsync
DeleteWebhookAsync
SaveServiceAccountAsync
DeleteServiceAccountAsync
ReplaceAsync
GetType
ToString
Equals
GetHashCode

GetAsync ​

csharp
Task<DapperMaticAccessDocument> GetAsync()

Returns ​

Type: Task<DapperMaticAccessDocument>

SavePolicyAsync ​

csharp
Task SavePolicyAsync()

Returns ​

Type: Task

DeletePolicyAsync ​

csharp
Task&lt;bool&gt; DeletePolicyAsync()

Returns ​

Type: Task&lt;bool&gt;

SaveTenantAsync ​

csharp
Task SaveTenantAsync()

Returns ​

Type: Task

DeleteTenantAsync ​

csharp
Task&lt;bool&gt; DeleteTenantAsync()

Returns ​

Type: Task&lt;bool&gt;

SaveWebhookAsync ​

csharp
Task SaveWebhookAsync()

Returns ​

Type: Task

DeleteWebhookAsync ​

csharp
Task&lt;bool&gt; DeleteWebhookAsync()

Returns ​

Type: Task&lt;bool&gt;

SaveServiceAccountAsync ​

csharp
Task SaveServiceAccountAsync()

Returns ​

Type: Task

DeleteServiceAccountAsync ​

csharp
Task&lt;bool&gt; DeleteServiceAccountAsync()

Returns ​

Type: Task&lt;bool&gt;

ReplaceAsync ​

csharp
Task ReplaceAsync()

Returns ​

Type: Task

GetType ​

csharp
GetType()

ToString ​

csharp
ToString()

Equals ​

csharp
Equals()

GetHashCode ​

csharp
GetHashCode()