Exemple #1
0
        private static NonQueryOperation GetOperation(MapperDb db)
        {
            NonQueryOperation operation;

            switch (db.DatabaseType)
            {
                case DatabaseType.MySql:
                    operation = new MySqlNonQuery();
                    break;
                case DatabaseType.SqlServer:
                    operation = new SqlServerNonQuery();
                    break;
                default:
                    operation = new PostgreSQLNonQuery();
                    break;
            }

            return operation;
        }
Exemple #2
0
        private static NonQueryOperation GetOperation(MapperDb db)
        {
            NonQueryOperation operation;

            switch (db.DatabaseType)
            {
            case DatabaseType.MySql:
                operation = new MySqlNonQuery();
                break;

            case DatabaseType.SqlServer:
                operation = new SqlServerNonQuery();
                break;

            default:
                operation = new PostgreSQLNonQuery();
                break;
            }

            return(operation);
        }