Extended template configuration alignment¶
This document is the canonical reference for connection string keys, SQL catalog names, and shared infrastructure tokens in Layer 3 extended templates that consume ConnectSoft.BaseTemplate as the base-template/ git submodule.
For repo layout, CI/CD, and MSBuild layering, see Extended templates: full multi-layer alignment playbook. For SaaS bounded contexts, also see SaaS Template Baseline Checklist.
Principles¶
- Fork-owned appsettings (everything outside
base-template/) must not embedBASETEMPLATE_*literals meant for template symbol replacement inside the submodule. Use product-specific catalog names or the shared tokens below. ConnectionStringskeys should be prefixed withConnectSoft.{ProductPrefix}for SQL Server keys used by NHibernate, Health Checks UI, and product-specific databases (unless intentionally reusing a documented shared key).- AcceptanceTests must mirror Application keys and
Database=catalogs per environment (Development,Development.Docker). - Pick one HangFire connection string key pattern per repo and use it consistently (do not mix
ConnectSoft.BaseTemplateHangFireConnectionStringandConnectSoft.{Product}HangFireConnectionStringacross environments without an ADR).
Shared SQL catalog tokens¶
These literals often appear inside embedded connection strings (NServiceBus persistence, HangFire, shared infra):
| Token | Usage |
|---|---|
HANGFIRE_DATABASE |
HangFire SQL storage catalog |
NSERVICEBUS_DATABASE |
NServiceBus persistence / SQL transport catalogs where applicable |
Audit |
AuditNet sample DB when enabled |
Orleans clustering (ADO.NET)¶
Use a product-scoped Orleans SQL catalog token when silos must not share a generic dev DB across unrelated templates:
| Pattern | Example |
|---|---|
{PRODUCT}_ORLEANS_DATABASE |
AUTHSERVER_ORLEANS_DATABASE, BOTFRAMEWORK_ORLEANS_DATABASE, WORKER_ORLEANS_DATABASE |
Extended templates may standardize on MICROSERVICE_ORLEANS_DATABASE when they follow the MicroserviceTemplate naming convention.
Avoid leftover BASETEMPLATE_ORLEANS_DATABASE in fork-layer JSON.
Typical connection string keys (NHibernate / SQL Server hosts)¶
| Key pattern | Purpose |
|---|---|
ConnectSoft.{Product}SqlServer |
Primary NHibernate / application SQL |
ConnectSoft.{Product}HealthCheckUI |
Health Checks UI storage |
ConnectSoft.{Product}HangFireConnectionString |
HangFire when product-scoped |
Health Checks UI embedded strings should use a catalog such as {Product}HealthCheckUI or {Product}TemplateHealthCheckUI aligned with the Application layer.
MongoDB¶
When MongoDB is used, PersistenceModelOptions:MongoDb:DatabaseName (or the template’s equivalent section name) should use the product database name, not BASETEMPLATE_* placeholders.
Submodule boundary¶
Files under base-template/ retain BASETEMPLATE_* tokens for dotnet new symbol replacement. Do not “fix” those tokens inside the submodule from a Layer 3 fork—change ConnectSoft.BaseTemplate and advance the submodule pointer.
Related documents¶
- BaseTemplate DI Extensibility — options roots (
BaseTemplatevs product section). - Template Layering and Reuse — three-layer model.