Estou tendo esse erro:
System.InvalidOperationException
HResult=0x80131509
Message=The LINQ expression 'DbSet<ItemNotaFiscal>()
.Join(
inner: DbSet<Faixa>(),
outerKeySelector: i => EF.Property<int?>(i, "FaixaId"),
innerKeySelector: f => EF.Property<int?>(f, "FaixaId"),
resultSelector: (o, i) => new TransparentIdentifier<ItemNotaFiscal, Faixa>(
Outer = o,
Inner = i
))
.LeftJoin(
inner: DbSet<Album>(),
outerKeySelector: i => EF.Property<int?>(i.Inner, "AlbumId"),
innerKeySelector: a => EF.Property<int?>(a, "AlbumId"),
resultSelector: (o, i) => new TransparentIdentifier<TransparentIdentifier<ItemNotaFiscal, Faixa>, Album>(
Outer = o,
Inner = i
))
.LeftJoin(
inner: DbSet<Artistum>(),
outerKeySelector: i => EF.Property<int?>(i.Inner, "ArtistaId"),
innerKeySelector: a0 => EF.Property<int?>(a0, "ArtistaId"),
resultSelector: (o, i) => new TransparentIdentifier<TransparentIdentifier<TransparentIdentifier<ItemNotaFiscal, Faixa>, Album>, Artistum>(
Outer = o,
Inner = i
))
.Where(i => i.Inner.Nome == "Led Zeppelin")
.GroupBy(i => i.Outer.Inner)' could not be translated. Either rewrite the query in a form that can be translated, or switch 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.
Source=Microsoft.EntityFrameworkCore
StackTrace:
em Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.<VisitMethodCall>g__CheckTranslated|15_0(ShapedQueryExpression translated, <>c__DisplayClass15_0& )
em Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
em System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
em System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
em Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
em System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
em System.Linq.Expressions.ExpressionVisitor.Visit(Expression node)
em Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)
em Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async)
em Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async)
em Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass9_0`1.<Execute>b__0()
em Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func`1 compiler)
em Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
em Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)
em Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1.GetEnumerator()
em Program.<<Main>$>g__GetFaixas|0_0(AluraTunesDbContext contexto, String textoBusca, String buscaAlbum) em C:\projetos\AluraTunes\AluraTunes\LinqToEntities\Program.cs:linha 197
em Program.<Main>$(String[] args) em C:\projetos\AluraTunes\AluraTunes\LinqToEntities\Program.cs:linha 89