protected void Application_Start() { //加载QueryEntity的配置 string file = Server.MapPath("~/Content/QueryConfig.json"); ConnectionStringSettings connSet = System.Configuration.ConfigurationManager.ConnectionStrings["DefaultConnection"]; ColysSharp.DataBase.DBContextConfig config = new ColysSharp.DataBase.DBContextConfig(connSet, "Common.{0},Common") { LogSql = 1 }; ColysSharp.DataBase.DBContext.LoadConfigFromFile(file, config); log4net.Config.XmlConfigurator.Configure();//这句代码 AreaRegistration.RegisterAllAreas (); RegisterGlobalFilters (GlobalFilters.Filters); RegisterRoutes (RouteTable.Routes); }
protected void Application_Start() { //加载QueryEntity的配置 string file = Server.MapPath("~/Content/QueryConfig.json"); ConnectionStringSettings connSet = System.Configuration.ConfigurationManager.ConnectionStrings["DefaultConnection"]; ColysSharp.DataBase.DBContextConfig config = new ColysSharp.DataBase.DBContextConfig(connSet, "Common.{0},Common") { LogSql = 1 }; ColysSharp.DataBase.DBContext.LoadConfigFromFile(file, config); log4net.Config.XmlConfigurator.Configure(); //这句代码 AreaRegistration.RegisterAllAreas(); RegisterGlobalFilters(GlobalFilters.Filters); RegisterRoutes(RouteTable.Routes); }