Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Anyone know why Dapper returns an int from .Execute(...) ?

I can't find this documented anywhere.

like image 870
Drew R Avatar asked Oct 30 '15 13:10

Drew R


1 Answers

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.

like image 191
CathalMF Avatar answered Sep 29 '22 10:09

CathalMF