使用实体框架时,ObjectContext.ExecuteFunction
是否有替代方法,以便该过程可以返回正确的值?
public virtual int NMU_VALIDATELOGIN(Nullable<decimal> sTAFFIN, Nullable<decimal> pASSWDIN, ObjectParameter vALID_LOGIN)
{
var sTAFFINParameter = sTAFFIN.HasValue ?
new ObjectParameter("STAFFIN", sTAFFIN) :
new ObjectParameter("STAFFIN", typeof(decimal));
var pASSWDINParameter = pASSWDIN.HasValue ?
new ObjectParameter("PASSWDIN", pASSWDIN) :
new ObjectParameter("PASSWDIN", typeof(decimal));
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("NMU_VALIDATELOGIN", sTAFFINParameter, pASSWDINParameter, vALID_LOGIN);
}