0

I have encrypted SSN column using Always Encrypted feature in SQL server 2016. When I try to get the encrypted column in LINQ I always get error. I tried equals and contains but got the same error.

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 - string in DB - SSN CHar(9) Latin1_General_BIN2

DavidG
  • 113,891
  • 12
  • 217
  • 223
Windows10
  • 51
  • 9

1 Answers1

0

have changed the datatype in table and it worked.

Windows10
  • 51
  • 9