src/Shared/EntityFramework/Core/Objects/Internal/ObjectQueryState.cs
// <summary>
// Helper method to return the first non-null merge option from the specified nullable merge options,
// or the <see cref="DefaultMergeOption" /> if the value of all specified nullable merge options is <c>null</c>.
// </summary>
// <param name="preferredMergeOptions"> The available nullable merge option values, in order of decreasing preference </param>
// <returns>
// the first non-null merge option; or the default merge option if the value of all
// <paramref
//     name="preferredMergeOptions" />
// is null
// </returns>
Helper method to return the first non-null merge option from the specified nullable merge options,
or the  if the value of all specified nullable merge options is null
Helper method to return the first non - null merge option from the specified nullable merge options or the if the value of all specified nullable merge options is null
protected static MergeOption EnsureMergeOption(params MergeOption?[] preferredMergeOptions)
        {
            foreach (var preferred in preferredMergeOptions)
            {
                if (preferred.HasValue)
                {
                    return preferred.Value;
                }
            }
            return DefaultMergeOption;
        }
protected static MergeOption EnsureMergeOption ( params MergeOption ? [ ] preferredMergeOptions ) { foreach ( var preferred in preferredMergeOptions ) { if ( preferred . HasValue ) { return preferred . Value ; } } return DefaultMergeOption ; }
Helper method to return the first non-null merge option from the specified nullable merge options,
or the  if the value of all specified nullable merge options is null
Helper method to return the first non - null merge option from the specified nullable merge options or the if the value of all specified nullable merge options is null
the first non-null merge option; or the default merge option if the value of all


the first non - null merge option ; or the default merge option if the value of all
preferredMergeOptions
<not_specific>
The available nullable merge option values, in order of decreasing preference
The available nullable merge option values in order of decreasing preference