Skip to content

Conversation

ScarletKuro
Copy link

@ScarletKuro ScarletKuro commented Oct 14, 2025

Fixes: #820
Fixes: #566 (was closed due to a workaround)

Description:
The issue occurs because the code always attempts to wrap the result in MapsterAsyncEnumerable, even when the type does not implement IAsyncEnumerable. This fix ensures wrapping only happens if the type actually implements IAsyncEnumerable, which prevents the MissingMethodException to throw.

@DocSvartz
Copy link

@ScarletKuro Can you do this using the development branch?
So we can include it in the next pre-releases version.

@ScarletKuro
Copy link
Author

@ScarletKuro Can you do this using the development branch?
So we can include it in the next pre-releases version.

Sure, do I leave this open tho?

@DocSvartz
Copy link

DocSvartz commented Oct 17, 2025

Yes, leave this open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mapster.EFCore ProjectToType<T>().FirstOrDefaultAsync throwing exception Mapster.EFCore ProjectToType<T>().SingleOrDefault throwing exception

2 participants