Configuration¶
Configuration lives in src/ConnectSoft.Saas.Billing.Application/appsettings*.json. Cross-cutting sections (HealthChecks, OpenTelemetry, Swagger, Serilog, RateLimiting, WebSecurity, etc.) are inherited from the Base Template. Billing-relevant sections:
Multitenancy¶
"Multitenancy": {
"DeploymentKind": "SharedDb",
"TenantResolutionStrategy": "ConfigurationFirstThenJwtThenHeaders",
"HttpTenantHeaderName": "X-Tenant-Id",
"JwtTenantClaimType": "tid",
"MessagingTenantHeaderName": "tenant-id"
}
Default is shared DB with row-level isolation via the SaasTenantFilter NHibernate filter on TenantId.
Persistence¶
"Persistence": {
"Dialect": "sqlserver",
"ConnectionStrings": {
"ConnectSoft.Saas.Billing": "...",
"ConnectSoft.Saas.BillingPostgreSQL": "...",
"ConnectSoft.Saas.BillingMySql": "..."
}
}
Shipped hibernate.cfg.xml targets SQL Server; docs/configuration.md documents switching to postgres / mysql / oracle / sqlite. BillingConstants.NHibernateDIKey supports multi-database hosts.
MassTransit¶
MassTransit:TransportType and PersistenceType default to None (in-memory). Configure a transport (e.g. RabbitMQ) and persistence for real deployments; topology is in BillingMassTransitTopology.
Orleans¶
The Orleans section uses localhost clustering with AdoNet grain persistence/reminders on SQL Server (BILLING_ORLEANS_DATABASE), grain store SubscriptionsGrainStorage.
gRPC errors¶
Grpc:GrpcErrorHandlingStrategy = RichError enables the Billing-owned GrpcRichErrorInterceptor.