예제 #1
0
 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);
 }
예제 #2
0
        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);
        }