src/Shared/EntityFramework/Core/Objects/Internal/EntitySqlQueryBuilder.cs
// <summary>
// Merges <see cref="ObjectParameter" />s from a source ObjectQuery with ObjectParameters specified as an argument to a builder method.
// A new <see cref="ObjectParameterCollection" /> is returned that contains copies of parameters from both
// <paramref
//     name="sourceQueryParams" />
// and <paramref name="builderMethodParams" />.
// </summary>
// <param name="context">
// The <see cref="ObjectContext" /> to use when constructing the new parameter collection
// </param>
// <param name="sourceQueryParams"> ObjectParameters from the ObjectQuery on which the query builder method was called </param>
// <param name="builderMethodParams"> ObjectParameters that were specified as an argument to the builder method </param>
// <returns> A new ObjectParameterCollection containing copies of all parameters </returns>
Merges s from a source ObjectQuery with ObjectParameters specified as an argument to a builder method.
A new  is returned that contains copies of parameters from both

and .
Merges s from a source ObjectQuery with ObjectParameters specified as an argument to a builder method . A new is returned that contains copies of parameters from both and .
private static ObjectParameterCollection MergeParameters(
            ObjectContext context, ObjectParameterCollection sourceQueryParams, ObjectParameter[] builderMethodParams)
        {
            DebugCheck.NotNull(builderMethodParams);
            if (sourceQueryParams == null
                && builderMethodParams.Length == 0)
            {
                return null;
            }
            var mergedParams = ObjectParameterCollection.DeepCopy(sourceQueryParams);
            if (mergedParams == null)
            {
                mergedParams = new ObjectParameterCollection(context.Perspective);
            }
            foreach (var builderParam in builderMethodParams)
            {
                mergedParams.Add(builderParam);
            }
            return mergedParams;
        }
private static ObjectParameterCollection MergeParameters ( ObjectContext context , ObjectParameterCollection sourceQueryParams , ObjectParameter [ ] builderMethodParams ) { DebugCheck . NotNull ( builderMethodParams ) ; if ( sourceQueryParams == null && builderMethodParams . Length == 0 ) { return null ; } var mergedParams = ObjectParameterCollection . DeepCopy ( sourceQueryParams ) ; if ( mergedParams == null ) { mergedParams = new ObjectParameterCollection ( context . Perspective ) ; } foreach ( var builderParam in builderMethodParams ) { mergedParams . Add ( builderParam ) ; } return mergedParams ; }
Merges s from a source ObjectQuery with ObjectParameters specified as an argument to a builder method.
Merges s from a source ObjectQuery with ObjectParameters specified as an argument to a builder method .
A new ObjectParameterCollection containing copies of all parameters
A new ObjectParameterCollection containing copies of all parameters
context
ObjectContext
The  to use when constructing the new parameter collection
The to use when constructing the new parameter collection
sourceQueryParams
ObjectParameterCollection
ObjectParameters from the ObjectQuery on which the query builder method was called
ObjectParameters from the ObjectQuery on which the query builder method was called
builderMethodParams
ObjectParameter[]
ObjectParameters that were specified as an argument to the builder method
ObjectParameters that were specified as an argument to the builder method