DapperLib / Dapper.Contrib

Dapper community contributions - additional extensions for Dapper
Other
267 stars 97 forks source link

cannot handle numeric identities when they > max integer value #113

Open chengen1213 opened 3 years ago

chengen1213 commented 3 years ago

System.OverflowException: Value was either too large or too small for an Int32. at System.Decimal.ToInt32(Decimal d) at System.Decimal.opExplicit(Decimal value) at SqlCeServerAdapter.Insert(IDbConnection connection, IDbTransaction transaction, Nullable1 commandTimeout, String tableName, String columnList, String parameterList, IEnumerable1 keyProperties, Object entityToInsert) in //Dapper.Contrib/SqlMapperExtensions.cs:line 884 at Dapper.Contrib.Extensions.SqlMapperExtensions.Insert[T](IDbConnection connection, T entityToInsert, IDbTransaction transaction, Nullable`1 commandTimeout) in /_/Dapper.Contrib/SqlMapperExtensions.cs:line 377

var id = (int)r[0].id;

in \SqlMapperExtensions.cs

line 884 - cannot handle numeric identities when they > max integer value