// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddRazorPages().AddRazorRuntimeCompilation(); if (!_env.IsDevelopment()) { WebpackChunkNamer.Init(); } }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddRazorPages().AddRazorRuntimeCompilation(); if (!_env.IsDevelopment()) { WebpackChunkNamer.Init(); } services.AddDbContext <QuizDbContext>(options => options.UseInMemoryDatabase(databaseName: "Quiz")); }
public Startup(IHostingEnvironment env) { WebpackChunkNamer webpackChunkNamer = new WebpackChunkNamer(env); webpackChunkNamer.Init(); var builder = new ConfigurationBuilder() .SetBasePath(env.ContentRootPath) .AddEnvironmentVariables(); Configuration = builder.Build(); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddMvc(); WebpackChunkNamer.Init(); services.AddTransient <IUserRepository, UserRepository>(); }
// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { WebpackChunkNamer.Init(); services.AddMvc(); }