// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ZHCGContext context, ILoggerFactory loggerFactory) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } new CoreStartup(Configuration).Configure(app); app.UseCors("default"); app.UseAuthentication(); app.UseMvc(); app.UseStaticFiles(); loggerFactory.AddNLog(); //添加NLog env.ConfigureNLog("nlog.config"); //读取Nlog配置文件 context.Database.EnsureCreated(); }
public ValuesController(ZHCGContext context, IMemcachedClient memcachedClient) { _context = context; _memcachedClient = memcachedClient; }