Why does Dapper's .Execute(...) return an int?

Solution 1:

The integer represents the number of rows that were affected by your query.

It returns an integer so you know if your query has worked. If zero is returned and you expected something to have changed then you know there is a problem.

Solution 2:

Because DbCommand.ExecuteNonQuery (which Dapper uses internally, no doubt) returns an int for the number of rows affected. Why? Because it's more or less free, and is about the only thing that you can reasonably return for a generic INSERT or UPDATE.