始终加密列 - LINQ 查询等于不工作

Always Encrypted column - LINQ query Equals not working

我在 SQL 服务器 2016 中使用 Always Encrypted 功能加密了 SSN 列。当我尝试在 LINQ 中获取加密列时,我总是会出错。我尝试了 equals 和 contains 但得到了同样的错误。

Query = Query.Where(t => t.SSN == InputSSN);

The data types char(9) encrypted with (encryption_type = 'DETERMINISTIC', encryption_algorithm_name = 'AEAD_AES_256_CBC_HMAC_SHA_256',..are incompatible in the equal to operator. Statement(s) could not be prepared.

SSN,InputSSN - 字符串 在 DB - SSN CHar(9) Latin1_General_BIN2

已更改 table 中的数据类型并且它有效。