You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is the error thrown: SqlException: Column 'Membre.DateNaissance' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
If I remove the "Where" from the query, it works. The where has to be an expression that uses a collection.
I was able to simplify the GroupBy to this with the problem still there: GroupBy(e => EF.Functions.DateDiffYear(e.Membre.DateNaissance, DateTime.Today))
In the query: DateNaissance has the type: DateTime?
A query that worked on 6.0.1 doesn't work anymore on 6.0.3
Here is the query:
Here is the error thrown:
SqlException: Column 'Membre.DateNaissance' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
If I remove the "Where" from the query, it works. The where has to be an expression that uses a collection.
I was able to simplify the
GroupBy
to this with the problem still there:GroupBy(e => EF.Functions.DateDiffYear(e.Membre.DateNaissance, DateTime.Today))
In the query:
DateNaissance
has the type:DateTime?
Stacktrace:
then the trace for my code which calls toListAsync
EF Core version: 6.0.3
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 6.0.3
Operating system: Windows 10
IDE: visual studio 2022 17.1.2
The text was updated successfully, but these errors were encountered: