// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, MigrationsDbContext context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } context.Database.Migrate(); app.UseMvc(); }
private static void ExecuteNewMigrations() { using var context = new MigrationsDbContext(); context.Database.Migrate(); }