Decrypt the Particular column(i.e.Email) of a list from a list using linq.
Here is the code:
- List
_dbData; - _dbData = _repository.GetTicket(UserId).ToList();
In this _dbData a column name Email.This email is decrypted.
Here is the class to encypt the Email (AESCryptography.AES256_Decrypt). I am try this code :
_dbData = (decrypted.ToList().Select(u => AESCryptography.AES256_Decrypt(u.Email))).ToList();but not working.
I want to Fetch the list with the email column decrypted value.
I am trying this also but there is some problem.
- List decrypted = new List();
- foreach (var item in _dbData)
- {
- decrypted.add(new ListItem() {
- EMail = AESCryptography.AES256_Decrypt(item)
- }
- }
Suvendu Shekhar GiriPosted Mar 23, 2017, 12:58 AM