So I have a table with an identity column as the primary key, so it is an integer. So, why does SCOPE_IDENTITY() always return a decimal value instead of an int
SCOPE_IDENTITY()
try using this and you'll get an integer back:
ExecuteScalar('insert...; select CONVERT(int,scope_identity())');