// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, PropertyViewerContext context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app .UseHttpsRedirection() .UseRouting() .UseCors() .UseAuthorization() .UseEndpoints(endpoints => { endpoints.MapControllers(); }); if (env.IsDevelopment()) { context.Database.Migrate(); } }
public PropertyRepository(IConfiguration configuration, PropertyViewerContext context) { _httpClient.BaseAddress = new Uri(configuration["DataSourceUrl"]); _context = context; }