public void ConfigureServices(IServiceCollection services) { services.AddApplicationInsightsTelemetry(Configuration); services.AddHaufwerk("Dorothy", "https://haufwerk.sachsenhofer.com"); services.AddMvc(); var config = new Configuration(Configuration); services.AddSingleton(x => config); services.AddSingleton(x => CreateAutoMapperMappings()); services.AddDbContext<Db>(options => { options.UseSqlServer(config.ConnectionString); }); }
public HomeController(Configuration config) { _config = config; }