コード例 #1
0
        public static IDataBaseHelper GetSqlDataClassHelper(SqlPrividerType privider, string constr, string modelNameSpace)
        {
            IDataBaseHelper classHelper = null;

            switch (privider)
            {
            case SqlPrividerType.SqlClient:
                classHelper = new SqlServerDBHelper(constr, modelNameSpace);
                break;

            case SqlPrividerType.OracleClient:
                classHelper = new OracleDBHelper(constr, modelNameSpace);
                break;

            case SqlPrividerType.Sqlite:
                classHelper = new SQLiteDBHelper(constr, modelNameSpace);
                break;

            case SqlPrividerType.MySqlClient:
                classHelper = new MySqlDBHelper(constr, modelNameSpace);
                break;
            }
            return(classHelper);
        }
コード例 #2
0
        public static IDataBaseHelper GetSqlDataClassHelper(SqlPrividerType privider, string constr, string modelNameSpace, Dictionary <string, string> dataBaseKyFieldTableDic, Dictionary <string, string> tableToTableNameDic)
        {
            IDataBaseHelper classHelper = null;

            switch (privider)
            {
            case SqlPrividerType.SqlClient:
                classHelper = new SqlServerDBHelper(constr, modelNameSpace, dataBaseKyFieldTableDic, tableToTableNameDic);
                break;

            case SqlPrividerType.OracleClient:
                classHelper = new OracleDBHelper(constr, modelNameSpace, dataBaseKyFieldTableDic, tableToTableNameDic);
                break;

            case SqlPrividerType.Sqlite:
                classHelper = new SQLiteDBHelper(constr, modelNameSpace, dataBaseKyFieldTableDic, tableToTableNameDic);
                break;

            case SqlPrividerType.MySqlClient:
                classHelper = new MySqlDBHelper(constr, modelNameSpace, dataBaseKyFieldTableDic, tableToTableNameDic);
                break;
            }
            return(classHelper);
        }