DIPSAS/Dapper.Oracle

Conversion exception thrown for OracleDynamicParameters.Get<int>() on an output parameter with a NUMBER (OracleDecimal) db type.

Havagan opened this issue · 0 comments

Conversion exception thrown when calling OracleDynamicParameters.Get() on an output parameter with a NUMBER (OracleDecimal) db type.

var params = new OracleDynamicParameters();
...
params.Add(name: "paramName", dbType: OracleMappingType.Int32, direction: ParameterDirection.Output);
... execute non-query ...
var output = params.Get<int>("paramName"); // throws an Exception.

Calling params.Get<decimal>() worked fine but is clunky to then have to convert to an int.