I need to pass parameters to SQL statement, with Firebird ADO everything works well, but with InterBase ADO there is a problem. My code:
result = conn.Query<DestClass>(sqlCmd, new
{
stringParam = stringVal,
intParam1 = intVal1,
intParam2 = intVal2
}).Single();
With that I've got FormatException, but when I define parameters with DynamicParameters and setting DbType.AnsiString for stringParam, SQL works well. But I've got many places in my code when I need to pass string and I don't want to change this in all places.
Then I found that I can use Dapper.SqlMapper.AddTypeMap(typeof(String), DbType.AnsiString);
but I can't. I've got Common Language Runtime detected an invalid program.
How to resolve this issue?
EDIT
It looks like problem is solved in Dapper v1.22.