Class SeedingSettings
- Namespace
- SEBT.Portal.Core.AppSettings
- Assembly
- SEBT.Portal.Core.dll
Configuration for database seeding behavior.
public class SeedingSettings : IHaveConfigSectionName
- Inheritance
-
objectSeedingSettings
- Implements
Properties
CoLoadedSeedEmailOverride
When set (e.g. in appsettings.Development.json), the co-loaded seed user and mock household
keyed to that user use this email instead of EmailPattern.
Remove or leave empty to use the default pattern. If you already have co-loaded@example.com
in the database, delete that user or clear seeded data before re-seeding.
public string? CoLoadedSeedEmailOverride { get; set; }
Property Value
- string
EmailPattern
Format string for seed user emails. Use {0} as placeholder for the scenario name. Default: "{0}@example.com" (e.g., "co-loaded@example.com"). For deployed environments, set to something like "sebt.dc+{0}@codeforamerica.org".
public string EmailPattern { get; set; }
Property Value
- string
EnableDevEndpoints
When true, exposes local/CI-only diagnostic endpoints such as
POST /api/dev/seed/reseed/{scenarioName}.
Default: false. Enable only for localhost and CI; never on deployed hosts,
including public "dev" environments that still use ASPNETCORE_ENVIRONMENT=Development.
public bool EnableDevEndpoints { get; set; }
Property Value
- bool
Enabled
When true, database seeding runs even outside the Development environment. Default: false (seeding only runs when ASPNETCORE_ENVIRONMENT is Development).
public bool Enabled { get; set; }
Property Value
- bool
SectionName
public static string SectionName { get; }
Property Value
- string
State
The state code (e.g., "dc", "co") from the STATE environment variable. Used to conditionally seed state-specific scenarios.
public string? State { get; set; }
Property Value
- string
Methods
BuildEmail(string)
Constructs a full email address from a scenario name using the configured pattern.
public string BuildEmail(string scenarioName)
Parameters
scenarioNamestringThe scenario name (e.g., "co-loaded", "verified").
Returns
- string
The full email address.