전자 메일을 사용하여 필터링하여 combobox
에 전자 메일을 표시하려고합니다. 내 문제는 내 데이터가 사용자 테이블에서 암호화된다는 것입니다. LINQ to Entities가 'System.String Decrypt (System.String, System.String)'메서드를 인식하지 못합니다.
LINQ to Entities does not recognize the method 'System.String Decrypt(System.String, System.String)' method, and this method cannot be translated into a store expression
가 어떻게이 오류를 해결할 수
:나는이 오류를주고 그것을 해독하려고 할 때? 여기
내 코드는 말에 엔티티 질의에 Linq에 기억
public IEnumerable<Lookup> getUser(string fText)
{
var ret = new List<Lookup>
{
new Lookup
{
boundvalue = 0,
boundtext = ""
}
};
if (!string.IsNullOrEmpty(fText))
{
ret.AddRange(_entities.Users.Where(x =>EncDec.Decrypt(x.UserVar01.Trim().Replace("_",string.Empty),
Enums.EncDecSecKeyToString(Enums.EncDecSecKey.Email)).Contains(fText.Trim()))
.Select(select => new Lookup
{
boundvalue = select.UserID,
boundtext = EncDec.Decrypt(select.UserVar01.Trim().Replace("_", string.Empty),
Enums.EncDecSecKeyToString(Enums.EncDecSecKey.Email)),
}));
}
return ret;
}
'String.Encrypt'와'String.Decrypt'를 사용하지 않았습니다. 그러나 *'x.UserVar01'을 해독하는 대신 쿼리 전에 * fText를 암호화하는 것은 어떨까요? –