Hi,
I thought I might post this and check whether anyone else can reproduce this issue. Take any Linq query (that returns an IQueryable) and append a Take(0), do you get 0 results? I have tried it on a few queries and I always get the full result set back. I suppose you are wondering why anyone would want to take 0 results. For a start I just stumbled across this, I was curious and wanted to confirm that 0 results are returned. However, I do see a potential real world problem where the take parameter is dynamic, in which case it might actually evaluate to 0.
LLBLGEN Version: 2.6 Final (April 15th, 2009)
Runtime library version: 2.6.9.511
Database Engine: SQL Server 2005
I am using the default templates without any changes.
An example of a query that produces this weird result is:
LinqMetaData context = new LinqMetaData();
var data = from c in context.Equipment
select c;
var result = data.Take(0).AsEnumerable();
Any ideas? Is this a bug or am I overlooking something fundamental?