Replies: 1 comment 4 replies
-
Check the execution plan. Run that as a LINQ statement, without AM. You should get the same result. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Version: x.y.z
AutoMapper 11.0.1
AutoMapper.Extensions.Microsoft.DependencyInjection 11.0.0
Microsoft.EntityFrameworkCore.SqlServer 6.0.4
Expected behavior
I'm trying to use groupby with returning the first result of a group. This got supported in the new version of EFCore: https://docs.microsoft.com/en-us/ef/core/what-is-new/ef-core-6.0/whatsnew#improved-groupby-support
Example:
I tried setting up a mapping from
T
toA
withCreateMap
andCreateProjection
. The result was the same.Actual behavior
The error I get after
ToListAsync
:If I skip the
GroupBy
,ProjectTo
works.Is there another way I could use this with projectTo?
Beta Was this translation helpful? Give feedback.
All reactions