在WCF RIA中的linq语句中调用存储过程做条件判断,提示无法识别改函数
我在WCF RIA中的linq查询语句中调用存储过程来作为where的条件判断,在运行时提示无法识别该存储过程。有没有大侠遇到过这种问题,劳烦解答!
代码如下:
public IQueryable<ProMainenance> getMyProMainenances(string userName)
{
return (from s in this.ObjectContext.ProMainenances
where s.auditID == userName ||
(from c in this.ObjectContext.LoginUsers
where c.ZT == true && c.InUserID == userName && c.UserId == s.auditID
select c).Count() > 0 ||
isAvaiable(s.Vehiclenum)
(from c in this.ObjectContext.proc_Vehiclerights(userName)
where s.Vehiclenum == c.Vehiclenum
select c
).Count() > 0
select s);
}