0
zsanhong created
I use abp suite to create a module solution(use EF as database), with some reason,I delete the database. but when I use update-database command to produce the database,there has nothing in the abpUses table, so I can't login the system and can't debug the solution. Please help me how to manual add seed to the database?
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
2 Answer(s)
-
0
Hi,
You can try:
public override void OnApplicationInitialization(ApplicationInitializationContext context) { ...... AsyncHelper.RunSync(async () => { using (var scope = context.ServiceProvider.CreateScope()) { await scope.ServiceProvider .GetRequiredService<IDataSeeder>() .SeedAsync(); } }); }Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
This question has been automatically marked as stale because it has not had recent activity.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)