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
TheLINQ expression 'DbSet<Pessoa>().OrderBy(item =>item.Email).Skip(__p_0).Take(__p_1).GroupBy(item =>item.Email).OrderBy(g =>g.Key).Select(g =>new{Key=g.Key,ItemCount=g.AsQueryable().Count(),HasSubgroups=False,Member="Email",AggregateFunctionsProjection=new{Count_Referencia=DbSet<Pessoa>().Select(t =>new{IdPessoa=t.IdPessoa,Referencia=t.Referencia,Nome_RazaoSocial=t.Nome_RazaoSocial,Apelido_Fantasia=t.Apelido_Fantasia,CPF_CNPJ=t.CPF_CNPJ,RG_IE=t.RG_IE,Email=t.Email}).OrderBy(item =>item.Email).Where(item =>item.Email==g.Key).Count()},Items=g})' could not be translated.Additionalinformation:Translationof 'Select' which contains grouping parameter without composition is not supported. Either rewrite the query in a form that can be translated,orswitch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'.See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.'
The below LINQ query works perfectly fine in EF6 world where the whole query seems to be evaluated at the server but fails in EF Core 9.
- Query
- Exception:
- Expression Tree
- Informations
EF Core version: 9.0.0
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 9.0
Operating system: Win 11 Pro
IDE: Visual Studio 2022 17.12
The text was updated successfully, but these errors were encountered: