Scope_Identity doesn’t return an Int in sqlserver but a Decimal
This is an old item. Scope_Identity in Sqlserver doesn’t return an Int but a Decimal. So in Dapper the call is
var id = conn.Query<Decimal>(...
Honour those who should and here.
Tags: dapper, dotnet, sqlserver