Database Seeding

Topics: Customizing Orchard, Writing modules
Jun 1, 2015 at 7:20 PM
Edited Jun 2, 2015 at 5:46 AM
Hi All,

Typically seeding was done through the migration.cs in one particular module.
For example, in the migration.cs of Orchard.UserLevels, I could seed it with
  • Level 1:.
  • Level 2:...
  • Level 3:...
    ***** etc
We see this kind of seeding as a more hardcore, non business related seeding and put them inside the migration.cs in its corresponding module.

There are another type of seeding which are for those core-business related seeding
For example, for a Football theme Customized Orchard, I want to always seed my initial database with Menus like:
Menu Football-A
 - Menu Sub-A
 - Menu Sub-A
Menu Football-B
 - Menu Sub-B
 - Menu Sub-B
 - Menu Sub-B
Currently we put these seeding inside the migration.cs, but as this kind of seeding data grows in different modules, it becomes difficult to manage. I am wondering if there is a way to do this kind of seeding inside the Recipe module since it already defines the included Modules.
Marked as answer by roish on 6/1/2015 at 9:46 PM