You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As something like cn.QueryFirstAsync("select...") give the following error: CS1503 Argument 2: cannot convert from 'string' to 'Dapper.CommandDefinition'
Edit: It seems the methods are there, but for some reason the compiler is resolving only these four methods to the wrong overload.
The text was updated successfully, but these errors were encountered:
I have been looking into this, still have no clue on why it happens or how to fix it.
How to reproduce:
using Dapper;
using System.Data;
class Program
{
static void Main(string[] args)
{
IDbConnection cn = null;
cn.QueryFirstAsync("foo"); // cannot convert from 'string' to 'Dapper.CommandDefinition'
}
}
Add dynamic overloads for:
- QueryFirstAsync
- QueryFirstOrDefaultAsync
- QuerySingleAsync
- QuerySingleOrDefaultAsync
This may change a lot in 2.x, but many people asking for them now so here they are. Unit tests also fixed for QuerySingleOrDefaultAsync.
Note: this builds on the netstandard2 branch because of the xUnit changes to go with VS 2017 15.3.
Using dapper 1.50.2, the following overloads seem to be missing:
As something like
cn.QueryFirstAsync("select...")
give the following error:CS1503 Argument 2: cannot convert from 'string' to 'Dapper.CommandDefinition'
Edit: It seems the methods are there, but for some reason the compiler is resolving only these four methods to the wrong overload.
The text was updated successfully, but these errors were encountered: