I am using dapper extensions (SqlMapperExtensions.cs).
When doing a simple insert:
db.Insert<Student>(student);
I get an exception:
Object of type 'System.Int32' cannot be converted to type 'System.Int16'.
The Id type in the db is SmallInt.
The Id type in the POCO is Short.
When I breakpoint in the Catch block, I can see the data has succefully persisted to the the db. It seems the problem is when the methods comes back and tries to set the new Id created into the POCO.
When I change the Id type in POCO to Int , it works.
Is this a bug ? what am I missing ?