Dapper doesn’ t read return values from stored proc, so this
CREATE PROC MyProc AS -- code.... return 1;
and then
int success = connection.Query<int>("MyProc", parameters, commandType: CommandType.StoredProcedure).First();
will fail, because nothing is actually returned.
As a fix, instead of returning value select it:
CREATE PROC MyProc AS -- code.... select 1;