For INSERT, UPDATE and DELETE SQL statements executed directly against the database, most database providers return the count of rows affected. For stored procedures, the number of records affected is always -1.
How do we get the number of records affected by a stored procedure?
Register an out parameter for the stored procedure, and set the value based on @@ROWCOUNT if using SQL Server.
Mind that if you have multiple INSERT/UPDATE/DELETEs, you’ll need a variable to store the result from @@ROWCOUNT for each operation.
Turn out SET NO COUNT ON in the stored procedure script (by default on Sql-Server Management Studio) and SqlCommand.ExecuteNonQuery(); always returned -1.
Just set it off : SET NO COUNT OFF without needing to use @@ROWCOUNT.