This is code cut right from the Dapper examples:
var p = new DynamicParameters();
p.Add("@a", 11);
p.Add("@b", dbType: DbType.Int32, direction: ParameterDirection.Output);
p.Add("@c", dbType: DbType.Int32, direction: ParameterDirection.ReturnValue);
cnn.Execute("spMagicProc", p, commandType: commandType.StoredProcedure);
int b = p.Get("@b");
int c = p.Get("@c");
Anyone: In the above code from the example provided, I get an error, "can't resolve .Execute"--referring to cnn.Execute
. I look at the connection object and there is no method for Execute. Dapper obviously works well, so what am I doing wrong?