コード例 #1
0
ファイル: Startup.cs プロジェクト: rb2750/ChangeCalculator
        // 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
ファイル: Startup.cs プロジェクト: rb2750/Quiz
        // 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"));
        }
コード例 #3
0
        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();
 }