I have a POCO:
public class Role
{
public Int32 Id { get; set; }
public string Name { set; get; }
}
The Oracle table is Id NUMBER(10,0)
and Name VARCHAR2(100 CHAR)
Dapper inserts fine but when I read the records it bring the Id as decimal and I get a parser error. And NO, I can't change the Int32 Id to decimal Id in POCO class.
NUMBER(10,0)
is an Int64
Discussed here. Converting it back is probably causing the decimal conversion - SwDevMan81 2012-04-03 20:02
Thanks to Alex I installed ODP.net and it worked.
Id NUMBER(10,0)
toINTEGER
? or change the query to something likeSELECT CAST(Id AS INTEGER) FROM ...
SwDevMan81 2012-04-03 19:56