LINQ to Entities 不识别方法的解决方案

public void GetList()

{

  DBHelper entity=new DBHelper();

   Expression<Func<Z_EnterpriseApplyGetMoney, bool>> wheres = r => r.AuditTime.ToDatetime().Month == DateTime.Now.Month && r.UserName == EUserInfoBySession.UserName && r.Status == 1;

  var list = entity.Z_EnterpriseApplyGetMoney.Where(wheres.Compile()).ToList();

}

posted @ 2016-04-12 10:22  丶半年  阅读(341)  评论(0编辑  收藏  举报