public static void SeedData(this IApplicationBuilder app, Seeder seeder) { var build = app.UseOwin(); build.Invoke(next => async env => { await seeder.SeedData(); await next(env); }); }
public async void Configure(IApplicationBuilder app, Seeder seeder, ILoggerFactory loggerFactory) { // Add the platform handler to the request pipeline. app.UseIISPlatformHandler(); loggerFactory.AddDebug(LogLevel.Information); app.SeedData(seeder); app.UseMvcWithDefaultRoute(); }