Skip to content
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

Async support #51

Open
gideonkorir opened this issue Dec 22, 2016 · 7 comments
Open

Async support #51

gideonkorir opened this issue Dec 22, 2016 · 7 comments

Comments

@gideonkorir
Copy link

Hi,

Awesome library love it. Do you have any plans for async support?

@maxtoroq
Copy link
Owner

No plans currently. I don't know enough about async. I'd accept guidance to evaluate feasibility.

@gideonkorir
Copy link
Author

I was talking about the *.Async APIs on DbConnection e.g. connection.OpenAsync and DbCommand e.g. command.ExecuteScalaAsync.
We could have something like IAsyncDatabase that depends on the System.Data.Common APIs?

I've tried implementing it but some classes e.g. SqlSet constructor is marked internal.
Hope that makes sense. Will to help out.

@maxtoroq
Copy link
Owner

If I understand correctly, the idea is to add methods to the API that, instead of returning T, return Task<T>. What are the methods you tried to implement?

@gideonkorir
Copy link
Author

Hi, was passed out the entire time :) I hadn't gotten to working with SqlSet and SqlTable but here is a gist on IDatabase IAsyncDatabase. Because in V6 we are using IDbConnection I added helper methods to try execute the operation in Async fashion if possible

@maxtoroq
Copy link
Owner

maxtoroq commented Jan 2, 2017

Hi. Decided I don't want to maintain code I don't use and don't fully understand (not a good recipe thinking long term). However, if you want to create your own project/package (e.g. DbExtensions.Async) then I'd be happy to make it easier for you, e.g. giving you access to internal members using [InternalsVisibleTo], or making non-breaking changes so the integration is easier.

@gideonkorir
Copy link
Author

Awesome thanks, the team decided to use NPoco for the current project but I don't mind working on an Async version. I can fork the project and make the necessary changes in my fork then I can keep updating you on what changes I would need and why, does that sound ok?

@maxtoroq
Copy link
Owner

maxtoroq commented Jan 3, 2017

Sounds good.

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

No branches or pull requests

2 participants