Page 1 of 1

Empty AsQueryable creates an Exception

Posted: Fri 15 Nov 2013 14:49
by Species8372
Hello,

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

System.Data.Common.Internal.Materialization.Shaper`1.StoreRead()
   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

results.Any()
or

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.

Re: Empty AsQueryable creates an Exception

Posted: Tue 19 Nov 2013 15:50
by MariiaI
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.