When would you use an output parameter vs a return variable, or vice versa? In the following simple example, I can achieve the same thing using either one.
Using out
I use return value to many things because it is more performative such as:
1 - When you insert or change an item when I do the validation in the database Return positive number to return the Identity and negative with the number of the error, it is faster.
2- When I make an appointment with paging use it to return the total amount of records is also faster and less costly. For the rest I use Output when there are several returns or different types of int. And of course I use recorset to return a list of items
How do I use the Dapper to make my queries I do not suffer.