コード例 #1
0
ファイル: Startup.cs プロジェクト: Basvanderhoeven/filmhuis
 // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
 public void Configure(IApplicationBuilder app, IHostingEnvironment env, LibraryContext libContext)
 {
     if (env.IsDevelopment())
     {
         app.UseDeveloperExceptionPage();
     }
     app.UseMvc();
     DBIntitializer.Initialize(libContext);
 }
コード例 #2
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, PicturesContext picContext)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseMvc();
            app.UseCors("AllowAllHeaders");
            DBIntitializer.Initialize(picContext);
        }
コード例 #3
0
 // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
 public void Configure(IApplicationBuilder app, IHostingEnvironment env, LibraryContext libContext)
 {
     app.UseCors(builder =>
                 builder.AllowAnyOrigin()
                 .AllowAnyHeader()
                 .AllowAnyMethod());
     if (env.IsDevelopment())
     {
         app.UseDeveloperExceptionPage();
     }
     app.UseMvc();
     DBIntitializer.Initialize(libContext);
 }