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.
// </summary>
// <param name="preferredMergeOptions"> The available nullable merge option values, in order of decreasing preference </param>
// <returns>
// the first non-null merge option; or <c>null</c> 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.
Helper method to return the first non - null merge option from the specified nullable merge options .
protected static MergeOption? GetMergeOption(params MergeOption?[] preferredMergeOptions)
        {
            foreach (var preferred in preferredMergeOptions)
            {
                if (preferred.HasValue)
                {
                    return preferred.Value;
                }
            }
            return null;
        }
protected static MergeOption ? GetMergeOption ( params MergeOption ? [ ] preferredMergeOptions ) { foreach ( var preferred in preferredMergeOptions ) { if ( preferred . HasValue ) { return preferred . Value ; } } return null ; }
Helper method to return the first non-null merge option from the specified nullable merge options.
Helper method to return the first non - null merge option from the specified nullable merge options .
the first non-null merge option; or null is null
the first non - null merge option ; or null is null
preferredMergeOptions
The available nullable merge option values, in order of decreasing preference
The available nullable merge option values in order of decreasing preference