【发布时间】:2016-09-22 07:27:29
【问题描述】:
我有以下代码。我想用 if 条件检查结果是否为null,但它总是显示错误。如何解决?
string StrRefNo = Request.QueryString["ref"];
string[] SMSid = StrRefNo.Split('$');
DownloadsDbEntities db = new DownloadsDbEntities();
var data = (from d in db.SMSLink_Expiry
where d.RefNo == SMSid[0]
&& d.SMSLink.ID == Convert.ToInt32(SMSid[1])
select d).ToList();
if (data.Count > 0)
{
string ss = "yes";
}
LINQ to Entities 不支持 LINQ 表达式节点类型“ArrayIndex”。
【问题讨论】: