<分区>
我有这样一个类:
public class menu{
public string Permission{get;set;}
}
Permission
的值是 Encripted 。我想要所有 Permission
为 True
的记录。为此,我使用此查询:
return
_menuSettings.Where(row => Convert.ToBoolean(Utilities.Encryption.Decrypt(row.Permission,"key"))==true).ToList();
但是我得到这个错误:
LINQ to Entities does not recognize the method 'Boolean ToBoolean(System.String)' method, and this method cannot be translated into a store expression.
我在谷歌上搜索过,但我无法解决。
谢谢