Exemple #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(
            IApplicationBuilder app,
            IHostingEnvironment env,
            IDBTag dBTag)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            //app.UseDefaultFiles();
            //app.UseStaticFiles();
            //app.UseFileServer(); // = app.UseDefaultFiles() + app.UseStaticFiles();

            app.UseNodeModules(env);

            app.UseAuthentication();

            app.UseMvcWithDefaultRoute(); // app.UseMvc(ConfigureRoutes);

            app.Run(async(context) =>
            {
                var dbTag = dBTag.GetDBTag();
                await context.Response.WriteAsync(dbTag);
            });
        }
Exemple #2
0
 public DBTag(IDBTag dBTag)
 {
     _dbTag = dBTag;
 }
 public HomeController(ICommentData commentData, IDBTag dBTag, IConfiguration configuration)
 {
     _commentData   = commentData;
     _dbTag         = dBTag;
     _configuration = configuration;
 }