Use DataSeedHelper

pull/1156/head
Halil ibrahim Kalkan 6 years ago
parent 4660c50ece
commit 88a8988d8d

@ -98,7 +98,7 @@ namespace MyCompanyName.MyProjectName.IdentityServer
"MyProjectName"
};
/* MyProjectName_Web client is only needed if you created tiered
/* MyProjectName_Web client is only needed if you created a tiered
* solution. Otherwise, delete this client. */
await CreateClientAsync(
"MyProjectName_Web",

@ -1,4 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using MyCompanyName.MyProjectName.Data;
using MyCompanyName.MyProjectName.MultiTenancy;
using Volo.Abp;
using Volo.Abp.AuditLogging;
@ -49,15 +50,7 @@ namespace MyCompanyName.MyProjectName
/* Seeding in the application startup can be a problem in a clustered environment.
* See https://github.com/abpframework/abp/issues/1123
*/
using (var scope = context.ServiceProvider.CreateScope())
{
AsyncHelper.RunSync(async () =>
{
await scope.ServiceProvider
.GetRequiredService<IDataSeeder>()
.SeedAsync();
});
}
DataSeedHelper.Seed(context);
}
}
}

Loading…
Cancel
Save