Exemple #1
0
        public ISqlResults CreateSqlResults(Connection connection)
        {
            ISqlResults result = null;
            switch (connection.ConnectionType)
            {
                case "SqlClient":
                    result = new SqlResults(connection.ConnectionString);
                    break;
                case "SQLite":
                    result = new SQLiteResults(connection.ConnectionString);
                    break;
            }

            if (result != null)
            {
                result.CommandTimeout = _commandTimeout;
                return result;
            }

            throw new NotImplementedException(String.Concat("Could not create ISqlResults for connection ", connection.ConnectionType));
        }
Exemple #2
0
        public ISqlResults CreateSqlResults(Connection connection)
        {
            ISqlResults result = null;

            switch (connection.ConnectionType)
            {
            case "SqlClient":
                result = new SqlResults(connection.ConnectionString);
                break;

            case "SQLite":
                result = new SQLiteResults(connection.ConnectionString);
                break;
            }

            if (result != null)
            {
                result.CommandTimeout = _commandTimeout;
                return(result);
            }

            throw new NotImplementedException(String.Concat("Could not create ISqlResults for connection ", connection.ConnectionType));
        }