예제 #1
0
파일: Startup.cs 프로젝트: MaksLn/Webjs
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, src.IUpdateNews updateNews, src.IUpdateDB updateDB)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseStaticFiles();

            app.UseMvc(e =>
            {
                e.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");
            });

            app.UseAuthentication();

            updateDB.UpdateDb(updateNews.Update());
        }
예제 #2
0
 public HomeController(ModelNewsContext DbContext, src.IUpdateNews updateNews, src.IUpdateDB dB)
 {
     update   = updateNews;
     Db       = DbContext;
     updateDB = dB;
 }