public static void INIT(IServiceProvider ServiceProvider) { var context = new DatabaseContext(ServiceProvider.GetRequiredService <DbContextOptions <DatabaseContext> >()); // If database does not exist then the database and all its schema are created context.Database.EnsureCreated(); var NAVcontext = new NAVContext(ServiceProvider.GetRequiredService <DbContextOptions <NAVContext> >()); var context1 = new UpdateContext(ServiceProvider.GetRequiredService <DbContextOptions <UpdateContext> >()); // If database does not exist then the database and all its schema are created var NASuperVcontext = new NAVSuperContext(ServiceProvider.GetRequiredService <DbContextOptions <NAVSuperContext> >()); }
public HomeController(DatabaseContext context, NAVContext navcontext) { _context = context; _navcontext = navcontext; }