Unable to cast object of type 'System.Int64' to type 'System.Int32'
Sqlite is weird with INTEGER.
From what I can see, when your column value is null, Sqlite returns it as a long/Int64 (8 bytes) so you should have a long property to map to, not an int/Int32 (4 bytes).
Fixed details:
Ref: https://github.com/StackExchange/Dapper/issues/1285
Unable to cast object of type 'System.Int64' to type 'System.Int32'
Sqlite is weird with INTEGER. From what I can see, when your
column value is null, Sqlite returns it as a long/Int64 (8 bytes)
so you should have a long property to map to, not an int/Int32 (4 bytes).