Table of Contents

Interface IAppDbContext

Namespace
Integrations.Application.Common
Assembly
Integrations.Application.dll

Persistence used by the application services. Implemented by the Postgres DbContext.

public interface IAppDbContext

Properties

AdminAudit

Append-only log of money and configuration changes (who, what, when).

DbSet<AdminAuditEntry> AdminAudit { get; }

Property Value

DbSet<AdminAuditEntry>

CertificateExpiryNotices

Expiry notices already sent (so each is sent once).

DbSet<CertificateExpiryNotice> CertificateExpiryNotices { get; }

Property Value

DbSet<CertificateExpiryNotice>

CertificateRequests

Certificate invites and resale-certificate requests.

DbSet<CertificateRequest> CertificateRequests { get; }

Property Value

DbSet<CertificateRequest>

Entities

Configured legal entities (PVC, DXT-CA, ...).

DbSet<LegalEntity> Entities { get; }

Property Value

DbSet<LegalEntity>

ExchangeRates

Daily exchange rates (immutable once stored).

DbSet<ExchangeRateObservation> ExchangeRates { get; }

Property Value

DbSet<ExchangeRateObservation>

Parties

Customers and vendors and their sync state with the provider.

DbSet<PartySyncRecord> Parties { get; }

Property Value

DbSet<PartySyncRecord>

ProviderCallAudits

One row per external provider call.

DbSet<ProviderCallAudit> ProviderCallAudits { get; }

Property Value

DbSet<ProviderCallAudit>

RateLocks

Exchange-rate locks.

DbSet<RateLock> RateLocks { get; }

Property Value

DbSet<RateLock>

ReconciliationIssues

Differences found by the nightly reconciliation.

DbSet<ReconciliationIssue> ReconciliationIssues { get; }

Property Value

DbSet<ReconciliationIssue>

TaxCodeMappings

Work type / category to tax code mappings.

DbSet<TaxCodeMapping> TaxCodeMappings { get; }

Property Value

DbSet<TaxCodeMapping>

TaxDocuments

Tax documents with their lines and jurisdiction details.

DbSet<TaxDocument> TaxDocuments { get; }

Property Value

DbSet<TaxDocument>

Methods

IsUniqueViolation(DbUpdateException)

True when the save failed on a unique index (a concurrent insert won the race).

bool IsUniqueViolation(DbUpdateException exception)

Parameters

exception DbUpdateException

Returns

bool

SaveChangesAsync(CancellationToken)

Saves pending changes (and the outbox messages queued with them) in one transaction.

Task<int> SaveChangesAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task<int>