I have this 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 foreach iteration variable.
In my opinion everything is correct and I do not know why the error above.