Пример #1
0
        // 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();
            }
        }
Пример #2
0
        // 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();
        }
Пример #4
0
 // 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>();
 }
Пример #5
0
 // 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();
 }