[re-linq] ArgumentException in StreamedSingleValueInfo.ExecuteQueryModel with Queryable.Max

13 views
Skip to first unread message

Fabian Schmied

unread,
Oct 15, 2009, 3:17:20 AM10/15/09
to re-motion Users
A user named Paul posted a question on our team blog -
http://www.re-motion.org/blogs/team/archive/2009/09/04/59.aspx
I'm copying it here because it might be of interest for other re-linq
users as well:

<quote>
I receive the following error when the Max() or Min() linq methods are
used like the example below shows
var highestBidder = (from b in bidders
select b).Max(b => b.Price);

Do you know how I can fix this?


Message: Error binding to target method.

Type: System.ArgumentException
Source: mscorlib
ParamName: null
TargetSite: System.Delegate CreateDelegate(System.Type, System.Object,
System.Reflection.MethodInfo, Boolean)
HelpLink: null
Stack: at System.Delegate.CreateDelegate(Type type, Object
firstArgument, MethodInfo method, Boolean throwOnBindFailure)
at System.Delegate.CreateDelegate(Type type, Object firstArgument,
MethodInfo method)
at
Remotion.Data.Linq.Clauses.StreamedData.StreamedSingleValueInfo.ExecuteQueryModel
(QueryModel queryModel, IQueryExecutor executor)
at Remotion.Data.Linq.QueryModel.Execute(IQueryExecutor executor)
at Remotion.Data.Linq.QueryProviderBase.Execute[TResult](Expression
expression)
at System.Linq.Queryable.Min[TSource,TResult](IQueryable`1 source,
Expression`1 selector)
at LinqToExcel.Tests.Convention_IntegrationTests.min() in C:\Working
\ReLinqToExcel\src\LinqToExcel.Tests
\Convention_IntegrationTests.cs:line 212
</quote>

My answer: This is a bug in re-linq builds prior to 1.13.23. I've done
a short spike, and it's definitely fixed on the trunk. So if you
experience this issue, upgrade to the trunk - or build 1.13.23 or
higher.

Cheers,
Fabian
Reply all
Reply to author
Forward
0 new messages