// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, SpeakerDbContext context) { context.Database.Migrate(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } // comment out for building Docker // uncomment for localhost // app.UseHttpsRedirection(); app.UseRouting(); app.UseCors("Policy"); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public HomeController(Models.SpeakerDbContext context) { _Context = context; }
public SpeakerController(SpeakerDbContext context) { _context = context; }
public SpeakerRepository(SpeakerDbContext context) { _context = context; _speakers = context.Speakers; }