In our C# code we are using Entity Framework. One of column in our table is encrypted and we want to decrypt and encrypt it before data is shown at user interface.
I think, the option is to encrypt or decrypt the string before every call to entity framework, which is very inefficient.
Can someone please suggest :
- If there is some option to write a function wrapper in base entity class itself, in get or set methods, where this encryption decryption functions will be called during read and write?
- Or, can we do something at SQL level.
Essentially, we do not want to write code before every Entity Framework call and want to do this at some central place.