Moq.Dapper
Moq.Dapper copied to clipboard
Can't query Tuples. Requires wrapping class type.
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.