src/Shared/EntityFramework/Core/Objects/Internal/EntitySqlQueryBuilder.cs
// <summary>
// Merges <see cref="ObjectParameter" />s from two ObjectQuery arguments to SetOp builder methods (Except, Intersect, Union, UnionAll).
// A new <see cref="ObjectParameterCollection" /> is returned that contains copies of parameters from both
// <paramref
//     name="query1Params" />
// and <paramref name="query2Params" />.
// </summary>
// <param name="query1Params"> ObjectParameters from the first ObjectQuery argument (on which the query builder method was called) </param>
// <param name="query2Params"> ObjectParameters from the second ObjectQuery argument (specified as an argument to the builder method) </param>
// <returns> A new ObjectParameterCollection containing copies of all parameters </returns>
Merges s from two ObjectQuery arguments to SetOp builder methods (Except, Intersect, Union, UnionAll).
A new  is returned that contains copies of parameters from both

and .
Merges s from two ObjectQuery arguments to SetOp builder methods ( Except Intersect Union UnionAll ) . A new is returned that contains copies of parameters from both and .
private static ObjectParameterCollection MergeParameters(
            ObjectParameterCollection query1Params, ObjectParameterCollection query2Params)
        {
            if (query1Params == null
                && query2Params == null)
            {
                return null;
            }
            ObjectParameterCollection mergedParams;
            ObjectParameterCollection sourceParams;
            if (query1Params != null)
            {
                mergedParams = ObjectParameterCollection.DeepCopy(query1Params);
                sourceParams = query2Params;
            }
            else
            {
                mergedParams = ObjectParameterCollection.DeepCopy(query2Params);
                sourceParams = query1Params;
            }
            if (sourceParams != null)
            {
                foreach (var sourceParam in sourceParams)
                {
                    mergedParams.Add(sourceParam.ShallowCopy());
                }
            }
            return mergedParams;
        }
private static ObjectParameterCollection MergeParameters ( ObjectParameterCollection query1Params , ObjectParameterCollection query2Params ) { if ( query1Params == null && query2Params == null ) { return null ; } ObjectParameterCollection mergedParams ; ObjectParameterCollection sourceParams ; if ( query1Params != null ) { mergedParams = ObjectParameterCollection . DeepCopy ( query1Params ) ; sourceParams = query2Params ; } else { mergedParams = ObjectParameterCollection . DeepCopy ( query2Params ) ; sourceParams = query1Params ; } if ( sourceParams != null ) { foreach ( var sourceParam in sourceParams ) { mergedParams . Add ( sourceParam . ShallowCopy ( ) ) ; } } return mergedParams ; }
Merges s from two ObjectQuery arguments to SetOp builder methods (Except, Intersect, Union, UnionAll).
Merges s from two ObjectQuery arguments to SetOp builder methods ( Except Intersect Union UnionAll ) .
A new ObjectParameterCollection containing copies of all parameters
A new ObjectParameterCollection containing copies of all parameters
query1Params
ObjectParameterCollection
ObjectParameters from the first ObjectQuery argument (on which the query builder method was called)
ObjectParameters from the first ObjectQuery argument ( on which the query builder method was called )
query2Params
ObjectParameterCollection
ObjectParameters from the second ObjectQuery argument (specified as an argument to the builder method)
ObjectParameters from the second ObjectQuery argument ( specified as an argument to the builder method )