public DateController(DateDbContext Context, IConfiguration configuration) { _context = Context; ed = new EventsDAL(configuration); md = new MoviesDAL(configuration); zd = new ZipCodeDAL(configuration); pd = new PlacesDAL(configuration); wd = new WeatherDAL(configuration); }
public MembersController(DateDbContext context) { _context = context; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ApplicationDbContext appDb, DateDbContext dateDb) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseDatabaseErrorPage(); } 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(); } appDb.Database.Migrate(); dateDb.Database.Migrate(); app.UseStaticFiles(); app.UseCookiePolicy(); app.UseForwardedHeaders(new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.XForwardedProto }); app.UseAuthentication(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); }
public HomeController(ScheduleService scheduleService, DateDbContext db) { this.scheduleService = scheduleService; this.db = db; }
public GroupsController(DateDbContext context) { _context = context; }