private static void UpdateDatabase(IApplicationBuilder app) { using (IServiceScope service = app.ApplicationServices.GetRequiredService <IServiceScopeFactory>().CreateScope()) { using (VPMDBContext context = service.ServiceProvider.GetService <VPMDBContext>()) { context.Database.Migrate(); } } }
public CustomersController(VPMDBContext context) { _context = context; projectServices = new ProjectServices(); }
public TasksController(VPMDBContext context) { _context = context; }