Example #1
0
        /// <summary>
        /// 创建传统数据库操作DAO
        /// </summary>
        /// <param name="connection"></param>
        /// <returns></returns>
        public static IDAO CreateDao(string connection)
        {
            IDAO dao;

            switch (DataBaseType)
            {
            case "Oracle":
                dao = new OracleDAO(connection);
                break;

            case "SQLServer":
                dao = new SqlServerDAO(connection);
                break;

            case "MySql":
                dao = new MySqlServerDAO(connection);
                break;

            default:
                dao = new MySqlServerDAO(connection);
                break;
            }
            return(dao);
        }
Example #2
0
 /// <summary>
 /// 创建传统数据库操作DAO
 /// </summary>
 /// <param name="connection"></param>
 /// <returns></returns>
 public static IDAO CreateDao(string connection)
 {
     IDAO dao;
     switch (DataBaseType)
     {
         case "Oracle":
             dao = new OracleDAO(connection);
             break;
         case "SQLServer":
             dao = new SqlServerDAO(connection);
             break;
         case "MySql":
             dao = new MySqlServerDAO(connection);
             break;
         default:
             dao = new MySqlServerDAO(connection);
             break;
     }
     return dao;
 }