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 versions of QueryFirst/Single/FirstorDefault/SingleOrDefault with CommandDefinition are missing #484

Closed
Tornhoof opened this issue Mar 22, 2016 · 10 comments
Labels
v3.0 Changes awaiting the next breaking release
Milestone

Comments

@Tornhoof
Copy link
Contributor

Hi,
currently there is:

static T QueryFirstOrDefault<T>(this IDbConnection cnn, CommandDefinition command)

but there is no

static Task<T> QueryFirstOrDefaultAsync<T>(this IDbConnection cnn, CommandDefinition command)

only the full version exists:

static Task<T> QueryFirstOrDefaultAsync<T>(this IDbConnection cnn, string sql, object param = null, IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)

Same applies to First/Single/SingleOrDefault

Please add the CommandDefinition versions of async First etc. methods too.

@Tornhoof Tornhoof changed the title Async overloads of QueryFirst/Single/FirstorDefault/SingleOrDefault with CommandDefinition are missing Async versions of QueryFirst/Single/FirstorDefault/SingleOrDefault with CommandDefinition are missing Mar 22, 2016
@mgravell
Copy link
Member

Checked and agreed, yeah that seems to be missing

@NickCraver
Copy link
Member

Adding to the v2 list.

@NickCraver NickCraver added the v3.0 Changes awaiting the next breaking release label Jan 28, 2017
@NickCraver NickCraver modified the milestone: v2.0 Jan 30, 2017
@tskimmett
Copy link

I don't see how this is a breaking change.

@mgravell
Copy link
Member

@tskimmett I don't think anyone suggested that it was (although we haven't done full depth check) - merely setting priorities and expectations

@diegofrata
Copy link

diegofrata commented May 21, 2018

@mgravell @tskimmett It is a breaking change as it adds a parameter to an existing method. Any binaries compiled against a previous version of Dapper will be unable to find the method as the signature has changed and it will break in runtime. If you need people to recompile, then it is a breaking change.

@tskimmett
Copy link

It doesn’t require adding a parameter. It is simply a method overload (new signature). No recompilation required unless you want to use the new signature.

@Tornhoof
Copy link
Contributor Author

Those methods are extra methods, not extra optional parameters, so it's not a breaking change.
Anyway the related PR was merged a year ago.

@diegofrata
Copy link

diegofrata commented May 21, 2018

Ha! I actually mistook the entire discussion for the addition of CancellationToken parameter to the Async methods as I navigated from the v2.0 planning issue into this one. My bad, should have read it more carefully. Re-reading it again I'm not sure how I actually made such a mess!

Perhaps someone wants to close this issue if it has been merged?

@say25
Copy link
Contributor

say25 commented Nov 29, 2019

This issue seems to be closed by #600

@NickCraver
Copy link
Member

Yep, closing out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3.0 Changes awaiting the next breaking release
Projects
None yet
Development

No branches or pull requests

6 participants