-1
I got it inside a foreach:
parameter.Add("@PROD", item.CDProduto);
parameter.Add("@Filial", item.filial);
parameter.Add("@Cod_Oper", cod_oper);
var result = _connection.ExecuteReader("sp_InsereVenda", parameter, transaction, commandType: System.Data.CommandType.StoredProcedure);
when I run I get this error
System.Data.Sqlclient.Sqlexception (0x80131904): Procedure or Function 'sp_InsereVenda' expects Parameter '@PROD', which was not supplied.
item is the iteration variable of foreach.
In my view everything is correct and I do not know why the above mistake.
Matheus, I use Dapper for that. That’s the question.
– pnet
You have to put sql here too?
– Matheus Rizzi