(edit) I found the Range method as an extension method of IEnumerable<T>, my bad. I don't see we support it, though creating an array from the range is supported (to pass in a range of values to filter on in a Contains call for example)
DrDelete wrote:
(...)
You are right, I missed the ThenBy operators in LLBLGenPro
.
The operator list that I was missing in LLBLGenPro is coming from a list provided by the NHibernate LINQ provider doc, see
http://www.hookedonlinq.com/LINQtoObjects.ashx
nhibernate linq provider? That's what I mean with others saying they have a linq provider while it can't even do a join.
But that site isn't about linq to nhibernate, it's a general site about linq.
there you can find also more detail about each operator by this link:
http://www.hookedonlinq.com/StandardQueryOperators.ashx
I don't think the operators that were missing in LLBLGenPro are coming from a new specification in EF 4.0 beta 1, but are already there in the original specification from May 2006.
There are no missing operators. Open MSDN of vs.net 2008, type in the index 'EqualAll' or 'ToSequence' and see that nothing turns up. all operators are defined on IQueryable<T> or on it's parent type IEnumerable<T>
I spend 9+ months full time writing this provider, I think I know which extensionmethods and expression classes are used in expression trees.
Why don't you believe me when I say they're not from .NET 3.5? Did you even look them up in the .NET 3.5 msdn? As they're not there, I assumed they're from .NET 4.0, as I don't know them and have never seen them before as well (except Range perhaps)
To answer your doubt, please click on the ToSequence link on the above page:
http://www.hookedonlinq.com/ToSequenceOperator.ashx
You'll see it's an old name. Today it's AsEnumerable, which of course makes no sense in a sql query.
From the list of operators that is provided at the NHibernate LINQ page I checked each operator with LLBLGenPro for coverage.
Trust me, we do have support for all possible linq operators, and Expression classes which make sense in a database environment. So for example SequenceEqual isn't supported with a reason, that's explained in the docs. Union is the only one missing which could make sense, and we don't support that because the runtime framework doesn't support union.
DrDelete wrote:
Walaa wrote:
I think these links are talking about LinqToObjects, not LinqToSQL, am I right?
Yes, these are LinqToObjects LINQ operators.
Has LinqToSQL less support on LINQ operators than LinqToObjects ?
Patrick, you should read my first post again. The set of extension methods on IEnumerable<T> which are inherited by IQueryable<T> not always make sense in a database context because a database doesn't use sequences, it uses sets.
Linq to objects uses IEnumerable<T> sources, all other linq operators use IQueryable<T> sources. Linq to objects uses sequences in-memory as an iterator has an order, it's a sequence. This allows things like SequenceEqual to be used, or Reverse, while or IQueryable<T> sources they make no sense, as a set of entities isn't a sequence, it's a set and SQL doesn't support sequence operators (unless you define a cursor)
Linq to sql also doesn't support ElementAt(), which we support (as it's the same as Skip(n).Take(1) ), though they support Union which we don't. Union is subjective though, often you can't create a union query anyway in SQL because the sequence oriented linq tree isn't convertable to SQL in a way that the results will be the same.
Besides that, what is exactly the question you want to ask, because I've provided you with a lot of info but you apparently don't see that as answering your question.