// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, TimepieceContext timeContext) { timeContext.Database.Migrate(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Home/Error"); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseCookiePolicy(); app.UseRouting(); app.UseAuthentication(); app.UseAuthorization(); app.UseEndpoints(routes => { routes.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}"); routes.MapRazorPages(); }); }
public HomeController(TimepieceContext context) { _context = context; }
public AddPageModel(TimepieceContext context, IWebHostEnvironment env) { _Context = context; _Env = env; Categories = _Context.Categories.ToList(); }
public IndexModel(TimepieceContext context) { _Context = context; }
public EditWatchPageModel(TimepieceContext context) { _Context = context; }