Hi,
I have faced with a problem when I used class with property "Count".
When I use this property in orderby clause, it generates to wrong
query: SELECT ... FROM ... ORDER BY SELECT COUNT(*). I discovered, why
it happend. There is some strange code: the class ExpressionDispatcher
(DbLinq.Data.Linq.Sugar.Implementation namespace), method
AnalyzeMember(Expression expression, BuilderContext builderContext)
contains chek:
if (!isStaticMemberAccess && memberInfo.Name == "Count")
return
AnalyzeProjectionQuery(SpecialExpressionType.Count, new[]
{ memberExpression.Expression }, builderContext);
This code leads to the described above problem. Can somebody describe
to me what this code means, and for what reasons it was written? If I
understood the logic, Count expression never can be a
MemberExpression, it is a CallExpression. As I know linq it doesn't
contain expression like "select someTable.count()".. Mey be it is bug?
Thanks.
--
You received this message because you are subscribed to the Google Groups
"DbLinq" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/dblinq?hl=en.