// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, RaiderLeagueContext context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseBrowserLink(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); context.Database.EnsureCreated(); var admin = new RegisteredUser() { Username = "******", Password = "******", Email = "*****@*****.**", AccessLevel = AccessLevel.ADMIN }; if (context.RegisteredUser.Where(us => us.Username == "admin").FirstOrDefault() == null) { context.RegisteredUser.Add(admin); context.SaveChanges(); } }
public ResultsController(RaiderLeagueContext context) { _context = context; }
public LoginController(RaiderLeagueContext context) { _context = context; }
public OperationsController(RaiderLeagueContext context) { _context = context; }
public ErrorViewModelsController(RaiderLeagueContext context) { _context = context; }
public BattleLogsController(RaiderLeagueContext context) { _context = context; }
public RegisterController(RaiderLeagueContext context) { _context = context; }
public BossesController(RaiderLeagueContext context) { _context = context; }