Closed flobiber closed 9 months ago
That looks like an EF Core issue. Check the execution plan. Run that as a LINQ statement, without AM. You should get the same result.
For all those who are interested: https://github.com/dotnet/efcore/issues/33069
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Source/destination types
Mapping configuration
Version: x.y.z
AutoMapper 13.0.1 AutoMapper.Collection 9.0.0 AutoMapper.Collection.EntityFrameworkCore 9.0.0 Microsoft.EntityFrameworkCore 8.0.1
Expected behavior
If i query with ProjectTo a single Element with FirstOrDefault and a filter expresion it should return this.
Actual behavior
If i run this command without a filter expresion everything is working fine. If i run this command with a filter expresion on PK to receive a single element, i get "could not be translated"-Exception.
When i do the exact same on a non polymorh-type both statements are working perfectly.
Steps to reproduce