public HomeController(ITableStorageRepo tableStorageRepo) { _tableStorageRepo = tableStorageRepo; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, IServiceProvider serviceProvider, ITableStorageRepo tableStore) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); //I am not a fan of this, but I want it done in startup, before and end-user-developer code. tableStore.Init().GetAwaiter().GetResult(); app.UseApplicationInsightsRequestTelemetry(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseBrowserLink(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseApplicationInsightsExceptionTelemetry(); app.UseStaticFiles(); app.UseCookieAuthentication(new CookieAuthenticationOptions()); _callbackHandler = new AuthCallbackHandler(); app.UseDxAuth(serviceProvider, Configuration, _callbackHandler); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); // Enable middleware to serve generated Swagger as a JSON endpoint app.UseSwagger(); // Enable middleware to serve swagger-ui assets (HTML, JS, CSS etc.) app.UseSwaggerUi(); }
public NewsArticleController(ITableStorageRepo tableStorageRepo) { _tableStorageRepo = tableStorageRepo; }
public NewsEditorController(ITableStorageRepo tableStorageRepo) { _tableStorageRepo = tableStorageRepo; }
public TableStorageSampleController(ITableStorageRepo tableStorageRepo) { TableStorageRepo = tableStorageRepo; }