这是我导入到模型中的存储过程:
public virtual ObjectResult<Nullable<decimal>> CPNRNTLRT(string pRDID, Nullable<System.DateTime> iSSDT, string tENORID, Nullable<System.DateTime> mATDT, ObjectParameter rESULT)
{
var pRDIDParameter = pRDID != null ?
new ObjectParameter("PRDID", pRDID) :
new ObjectParameter("PRDID", typeof(string));
var iSSDTParameter = iSSDT.HasValue ?
new ObjectParameter("ISSDT", iSSDT) :
new ObjectParameter("ISSDT", typeof(System.DateTime));
var tENORIDParameter = tENORID != null ?
new ObjectParameter("TENORID", tENORID) :
new ObjectParameter("TENORID", typeof(string));
var mATDTParameter = mATDT.HasValue ?
new ObjectParameter("MATDT", mATDT) :
new ObjectParameter("MATDT", typeof(System.DateTime));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Nullable<decimal>>("CPNRNTLRT", pRDIDParameter, iSSDTParameter, tENORIDParameter, mATDTParameter, rESULT);
}
我正在这样打电话
using (var context = new IPSMSEntities())
{
System.Data.Objects.ObjectParameter output = new System.Data.Objects.ObjectParameter("CPNRNTLRT", typeof(decimal));
var a = context.CPNRNTLRT("SUKUK", IssueDate, customer.TENOR_ID, MaturityDate,output);
}
但它给了我EntityCommandExecutionException was Unhandled By User