How can I run a store procedure with Dapper?
How can I run a store procedure with Dapper?
Assuming you wanted to get the result in a variable of type Cliente
.
var cliente = connection.Query<Cliente>("spClientes", new {Id = 1},
commandType: CommandType.StoredProcedure).First();
The first parameter is the name of the procedure, the second is the parameters passed to it, and the third is the type of command that will be executed.