I'm trying to figure out a way to set "native" db type, such as:
- PostgreSQL: NpgsqlDbType
- SQL Server: SqlDbType
- SQLite: SqliteType
- and others
when using DynamicParameters.
without writing a lot of boilerplate code, I can only see two method overloads, namely:
public void Add(string name, object? value, DbType? dbType, ParameterDirection? direction, int? size)
{...}
public void Add(string name, object? value = null, DbType? dbType = null, ParameterDirection? direction = null, int? size = null, byte? precision = null, byte? scale = null)
{...}
They obviously only support DbType, and while I've found some workaround in this SO answer, it looks really tedious just to change the type, I thought there would have been some option to pass the native db type name directly as a workaround, but this option is not available either.