Abp: Is it possibile to control the order of the data seeding?

Created on 18 Dec 2019  路  3Comments  路  Source: abpframework/abp

I have some seed classes (all of them implement IDataSeedContributor),
There are dependencies between data, so I want to know if there is a way to control the order of the seed classes execution.

Or I have to merge them into one class and write seed code from top to bottom.

All 3 comments

The order doesn't seem to make much sense.
Modules may need to seed some data, which should have nothing to do with the seed data of other modules.

You can call separate methods in your IDataSeedContributor to execute the seeds if you want to separate them.

This is what I do:

  1. Create more than one seeder, such as CategoryDataSeeder, ProductDataSeeder.
  2. Create single seed contributor to execute all the seeders:
    image
Was this page helpful?
0 / 5 - 0 ratings

Related issues

wocar picture wocar  路  3Comments

hikalkan picture hikalkan  路  3Comments

vfabregat picture vfabregat  路  3Comments

hikalkan picture hikalkan  路  3Comments

wocar picture wocar  路  3Comments