public IQueryable CreateQuery(System.Linq.Expressions.Expression expression) { if (expression == null) { throw new ArgumentNullException("expression"); } Type elementType = QueryableUtility.FindGenericType(typeof(IQueryable <>), expression.Type); if (elementType == null) { throw new ArgumentException(string.Empty, "expression"); } return(this.CreateQuery(elementType, expression)); }
public IQueryable CreateQuery(Expression expression) { // Copied logic from EnumerableQuery if (expression == null) { throw new ArgumentNullException("expression"); } Type elementType = QueryableUtility.FindGenericType(typeof(IQueryable <>), expression.Type); if (elementType == null) { throw new ArgumentException(String.Empty, "expression"); } return(CreateQuery(elementType, expression)); }