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

Can't query Tuples. Requires wrapping class type. #82

Open
80O opened this issue Dec 19, 2022 · 0 comments
Open

Can't query Tuples. Requires wrapping class type. #82

80O opened this issue Dec 19, 2022 · 0 comments

Comments

@80O
Copy link

80O commented Dec 19, 2022

Using connection.QueryAsync<(string, uint)>("SELECT name, id FROM users") will not yield any results when being mocked.

The only way to mock this is to wrap the tuple in a class eg:

class UserInfo
{
public string Name {get; set;}
public uint Id {get; set;}
}

`connection.QueryAsync<UserInfo>("SELECT name, id FROM users")`

Thought this library was not working or misconfigured at first before I tried this.

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 a pull request may close this issue.

1 participant