src/Shared/EntityFramework.SqlServer/SqlGen/Sql8ExpressionRewriter.cs
// <summary>
// Helper method for <see cref="RemoveNonSortProperties" />
// Checks whether expr has a 'match' in the given list of property expressions.
// If it does, the matching expression is removed form the list, to speed up future matching.
// </summary>
Helper method for
Checks whether expr has a 'match' in the given list of property expressions.
If it does, the matching expression is removed form the list, to speed up future matching.
Helper method for Checks whether expr has a ' match ' in the given list of property expressions . If it does the matching expression is removed form the list to speed up future matching .
private static bool HasMatchInList(
            DbPropertyExpression expr, IList<DbPropertyExpression> list, string exprBindingVariableName,
            string listExpressionsBindingVariableName)
        {
            for (var i = 0; i < list.Count; i++)
            {
                if (AreMatching(expr, list[i], exprBindingVariableName, listExpressionsBindingVariableName))
                {
                    list.RemoveAt(i);
                    return true;
                }
            }
            return false;
        }
private static bool HasMatchInList ( DbPropertyExpression expr , IList < DbPropertyExpression > list , string exprBindingVariableName , string listExpressionsBindingVariableName ) { for ( var i = 0 ; i < list . Count ; i ++ ) { if ( AreMatching ( expr , list [ i ] , exprBindingVariableName , listExpressionsBindingVariableName ) ) { list . RemoveAt ( i ) ; return true ; } } return false ; }
Helper method for
Checks whether expr has a 'match' in the given list of property expressions.
Helper method for Checks whether expr has a ' match ' in the given list of property expressions .
// This method is used for matching element of two list without duplicates, // thus if match is found, remove it from the list, to speed up future matching.
expr
DbPropertyExpression
list
IList<DbPropertyExpression>
exprBindingVariableName
string
listExpressionsBindingVariableName
string