-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Add support for IAsyncEnumerable
(QueryUnbufferedAsync
) on all .NET targets
#2143
Comments
I'm very aware of the package, and use it extensively in some other libs. I'll try to do a quick "do any wheels fall off?" check, probably this weekend. I know it isn't always easy or fast to do, but I also do strongly recommend updating to modern .NET; having net472 as a target is becoming increasingly limiting - something I've opined on at length here: https://blog.marcgravell.com/2020/01/net-core-net-5-exodus-of-net-framework.html |
- target net8.0 instead of net5.0 - lib updates
Awesome to hear! Hopefully that goes well.
Yep, I'm 100% with you on this. We have a ~20-year-old solution that we are trying to migrate for a while now, but there is a ton of technical debt in the way and some blockers such as a few ASP.NET WebForms projects that can only go up to .NET 4.8.... It will happen for sure, but it might take a couple years for all of the projects to be migrated if I'm being honest. This is why we would be able to reap the benefits of this change in the meantime. If we were going to migrate right away, I would likely not have proposed this one. |
Currently,
IAsyncEnumerable
support is conditioned on .NET5 or greater. For example:Dapper/Dapper/SqlMapper.Async.cs
Lines 1252 to 1347 in 6434c69
However, there shouldn't be any reason not to support
IAsyncEnumerable
on every target currently supported by Dapper, since there exists a well-maintained BCL package that adds the interface on older frameworks:To allow for
IAsyncEnumerable
to work everywhere, it would just be a matter of including a dependency on the package above for thenetstandard2.0
andnet462
targets. This approach is used heavily by other libraries for this exact same purpose.We currently have a solution that targets NET472 and we wanted to be able to tap into
IAsyncEnumerable
in a couple of places where we are currently being forced to useTask<IEnumerable<T>>
methods such asQueryAsync
.Could there be an update to the library that adds support for the
IAsyncEnumerable
-returning methods for all frameworks based on the above suggestion?The text was updated successfully, but these errors were encountered: