public PaniniController(
     UserManager <ApplicationUser> userManager,
     BokerDb context
     )
 {
     _userManager = userManager;
     _context     = context;
 }
Example #2
0
        public static void MigrateDatabase(IWebHost host)
        {
            using (IServiceScope scope = host.Services.CreateScope())
            {
                ApplicationDbContext context = scope.ServiceProvider.GetRequiredService <ApplicationDbContext>();
                context.Database.Migrate();

                BokerDb bokerContext = scope.ServiceProvider.GetRequiredService <BokerDb>();
                bokerContext.Database.Migrate();

                NavneVelgerDb navnContext = scope.ServiceProvider.GetRequiredService <NavneVelgerDb>();
                navnContext.Database.Migrate();
            }
        }
 public BokTypesController(BokerDb context)
 {
     _context = context;
 }