Empty AsQueryable creates an Exception

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Posts: 5
Joined: Wed 06 Apr 2011 13:45

Empty AsQueryable creates an Exception

Post by Species8372 » Fri 15 Nov 2013 14:49


if i call a sql-Query with zero results (empty table) to deliver a Queryable:

Code: Select all

IQueryable<IndexResult> results = ctx.ExecuteStoreQuery<IndexResult>(sql, parameters.ToArray()).AsQueryable<IndexResult>();
it will throw a

Code: Select all

   bei System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
   bei System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
   bei lambda_method(Closure )
   bei System.Linq.EnumerableExecutor`1.Execute()
   bei System.Linq.EnumerableQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
   bei System.Linq.Queryable.Any[TSource](IQueryable`1 source)
for either

Code: Select all


Code: Select all

foreach(IndexResult ir in results)
is this an expected behaviour?

I am using .NET4.0 EF, Devart.Data.Oracle.dll 6.70
I couldnt find mentioning it in the recent release notes, so it may probably still present in the latest Release.

Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Empty AsQueryable creates an Exception

Post by MariiaI » Tue 19 Nov 2013 15:50

We couldn't reproduce this issue in our environment with the latest build of dotConnect for Oracle 8.1.36. Please try upgrading your dotConnect for Oracle. If it doesn't help, please send us a test project so that we are able to investigate this issue in mode details.

Post Reply