src/Shared/EntityFramework/Core/Objects/ELinq/ObjectQueryProvider.cs
// <summary>
// Creates a new query instance using the given LINQ expresion.
// The current query is used to produce the context for the new query, but none of its logic
// is used.
// </summary>
// <param name="expression"> Expression forming the query. </param>
// <returns> ObjectQuery instance implementing the given expression. </returns>
Creates a new query instance using the given LINQ expresion.
The current query is used to produce the context for the new query, but none of its logic
is used.
Creates a new query instance using the given LINQ expresion . The current query is used to produce the context for the new query but none of its logic is used .
IQueryable IQueryProvider.CreateQuery(Expression expression)
        {
            Check.NotNull(expression, "expression");
            if (!typeof(IQueryable).IsAssignableFrom(expression.Type))
            {
                throw new ArgumentException(Strings.ELinq_ExpressionMustBeIQueryable, "expression");
            }
            var elementType = TypeSystem.GetElementType(expression.Type);
            return CreateQuery(expression, elementType);
        }
IQueryable IQueryProvider . CreateQuery ( Expression expression ) { Check . NotNull ( expression , " " ) ; if ( ! typeof ( IQueryable ) . IsAssignableFrom ( expression . Type ) ) { throw new ArgumentException ( Strings . ELinq_ExpressionMustBeIQueryable , " " ) ; } var elementType = TypeSystem . GetElementType ( expression . Type ) ; return CreateQuery ( expression , elementType ) ; }
Creates a new query instance using the given LINQ expresion.
Creates a new query instance using the given LINQ expresion .
// Determine the type of the query instance by binding generic parameter in Query<>.Queryable // (based on element type of expression)
ObjectQuery instance implementing the given expression.
ObjectQuery instance implementing the given expression .
expression
Expression
Expression forming the query.
Expression forming the query .