Interface IDatabaseSeeder
Service for seeding the database with initial or test data.
public interface IDatabaseSeeder
Methods
ClearSeededDataAsync(CancellationToken)
Clears all seeded data from the database. WARNING: This will delete all users and opt-ins. Use with caution.
Task ClearSeededDataAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task
ReseedUserScenarioAsync(string, bool, CancellationToken)
Deletes and recreates a single known seed scenario user so mutable E2E suites can restore a clean starting state without clearing the whole seed set.
Task ReseedUserScenarioAsync(string scenarioName, bool useMockHouseholdData, CancellationToken cancellationToken = default)
Parameters
scenarioNamestringA name from
SeedScenarios.useMockHouseholdDataboolWhether to reseed via the mock-household path.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task
SeedTestUsersAsync(bool, CancellationToken)
Seeds the database with specific test users for development.
Task SeedTestUsersAsync(bool useMockHouseholdData, CancellationToken cancellationToken = default)
Parameters
useMockHouseholdDataboolWhether to seed users corresponding to household mock data.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task
SeedTestUsersAsync(CancellationToken)
Seeds the database with specific test users for development.
Task SeedTestUsersAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task
SeedUsersAsync(int, CancellationToken)
Seeds the database with sample users for development/testing.
Task SeedUsersAsync(int userCount = 10, CancellationToken cancellationToken = default)
Parameters
userCountintNumber of users to create (default: 10).
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task