// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, DeliveryOptionsContext dbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } //Dbinitialise configure PostcodeInitializer.SeedDeliveryPostcodes(dbContext); app.UseHttpsRedirection(); app.UseCors(AllowSpecificOrigins); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public PostcodeLookupController(DeliveryOptionsContext context, IPostcodeLookup iPostcodeLookup) { _context = context; _iPostcodeLooup = iPostcodeLookup; }
public PostcodeLookup(DeliveryOptionsContext context) { _context = context; }