Ejemplo n.º 1
0
 public PaniniController(
     UserManager <ApplicationUser> userManager,
     BokerDb context
     )
 {
     _userManager = userManager;
     _context     = context;
 }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 3
0
 public BokTypesController(BokerDb context)
 {
     _context = context;
 }