Linq Take Support

Posts   
 
    
absintpm
User
Posts: 22
Joined: 12-Jun-2007
# Posted on: 05-Oct-2009 10:59:05   

I'm running this code:

            LinqMetaData m = new LinqMetaData();
            IQueryable<InvoicesEntity> q = m.Invoices;
            IEnumerable<InvoicesEntity> en = q.Take(10);
            IEnumerator e = en.GetEnumerator();

And I would expect it to be translated into a query like:

select top 10 * from Invoices

But the actual query executed is:

select * from Invoices

Is there something wrong in my code or is this a known issue?

I'm using LLBLGen Pro v 2.6 Final, SQL 2008, VS 2008 & .NET 3.5 SP1

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 05-Oct-2009 12:50:20   

Most probably you are using an old LLBLGen runtime library. Please download and use the latest.

Thanks.

absintpm
User
Posts: 22
Joined: 12-Jun-2007
# Posted on: 05-Oct-2009 15:48:44   

Yes, you're right. I've updated to the Sept 10th libraries and it works as expected now.

Thank you.