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
System.InvalidOperationException: 'The LINQ expression 'DbSet<TestEntity>()
.Join(
inner: __p_0,
outerKeySelector: t => (object)t.DateTime,
innerKeySelector: e => (object)e.DateTime,
resultSelector: (t, e) => new TransparentIdentifier<TestEntity, MyClass>(
Outer = t,
Inner = e
))' 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.'
Include provider and version information
EF Core version: 8
Database provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer): Microsoft.EntityFrameworkCore.SqlServer and Npgsql
Target framework: (e.g. .NET 6.0): dotnet 8
Operating system: windows 11
IDE: (e.g. Visual Studio 2022 17.4) Visual studio 2022 Version 17.8.0
The text was updated successfully, but these errors were encountered:
@erwan-joly what you're attempting here is a join over a non-primitive collection:
varlist=newMyClass[]{newMyClass(),newMyClass(){MyClassId=2}};varresult=context.TestEntities.Join(list,
x =>x.DateTime,
x =>x.DateTime,(x,y)=>new{x,y}).ToList();
That's not yet supported - it's tracked by #31237. That's a highly-voted issue, so hopefully this is something we'll be able to deliver for 9.0.
Ask a question
Not sure if this is a bug or a misunderstanding on what @roji meant here #13239 (comment)
After upgrading to dotnet 8 we still can't join primitive collection https://github.com/erwan-joly/EFBugRepro
Is it something currently supported ? My understanding is that dotnet 8 is supposed to bring the support for this ?
#13239 (comment)
#13239 (comment)
My goal here is to get rid of EntityFramework.MemoryJoin https://github.com/neisbut/EntityFramework.MemoryJoin If the issue here is that the list is not IQueryable is there anyway to tell EF that this list is IQueryable so it convert it to openjson ?
Include your code
https://github.com/erwan-joly/EFBugRepro
Include stack traces
Include provider and version information
EF Core version: 8
Database provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer): Microsoft.EntityFrameworkCore.SqlServer and Npgsql
Target framework: (e.g. .NET 6.0): dotnet 8
Operating system: windows 11
IDE: (e.g. Visual Studio 2022 17.4) Visual studio 2022 Version 17.8.0
The text was updated successfully, but these errors were encountered: