Group by error

Jul 30, 2010 at 8:52 PM
I'm trying to get this working with a custom oracle driver from c in db.Customers group c by 1 into grouped select new { Cities = grouped.Count() }; The problem I get is that in QueryBinder.BindGroupBy throws an ArgumentException 'item with the same key has already been added' at // make it possible to tie aggregates back to this group-by NewExpression newResult = this.GetNewExpression(pc.Projector); if (newResult != null && newResult.Type.IsGenericType && newResult.Type.GetGenericTypeDefinition() == typeof(Grouping<,>)) { Expression projectedElementSubquery = newResult.Arguments[1]; <---------------- Here this.groupByMap.Add(projectedElementSubquery, info); } Any ideas?
Aug 11, 2010 at 10:12 PM

Groupby has always been one of the hardest translations to get right.  It likely still has bugs that you are running into.