我正在使用 DbCommand
来自: System.ComponentModel.Component
我正在使用 params 构建一个对象:
DbCommand command = _webERPDB.GetStoredProcCommand("mySp");
_webERPDB.AddInParameter(command, "@a", DbType.Int32, policyId);
_webERPDB.AddInParameter(command, "@b", DbType.Int32, appPolicyPrintQaCheckListId);
_webERPDB.AddInParameter(command, "@c", DbType.Int32, createdBy);
现在,我想使用 linq 对其进行迭代:
IEnumerable<DbParameter> t = from a in command.Parameters select a;
但它会产生以下错误: