Skip to content

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

@80O

Description

@80O

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions