data-seeding - Seed Database Baseline Data with EksenOS
Populate a database with baseline data via idempotent IDataSeedContributor implementations, ordered with [SeedAfter], executed in one transactional unit of work.
Tags
Updated: 2026-06-30Capabilities
Typical Inputs
Typical Outputs
What this skill does
- write IDataSeedContributor implementation
- order contributors with SeedAfter attribute
- register contributors via AddDataSeeding
- run IDataSeeder at startup
- execute seeding in single transaction
Inputs
- Database connection
- Seed data definitions
- DI registered services
- EksenOS application builder
Outputs
- Populated database tables
- Transaction commit or rollback
- Seeded reference data
Requirements
- EksenOS framework with Eksen.DataSeeding package
- Database with EF Core configured
- DI container with registered repositories
- Unit of work support enabled
