I'm using CodeFluent Entities to manage my database for a ASPNET MVC3 web application. I would like to find a way to configure a Property of an Entity in my Model which would be 'transparently' managed with EncryptByPassPhrase and DecryptByPassPhrase TSQL functions.
Example TSQL INSERT/UPDATE (property 'Text') :
-> Add a @PassPhrase(?) parameter to send my key string -> replace '@Text' by 'EncryptByPassPhrase(@PassPhrase,@Text)
Example TSQL LOAD/SEARCH (property 'Text') :
-> Add a @PassPhrase(?) parameter to send my key string -> replace '@Text' by 'DecryptByPassPhrase(@PassPhrase,@Text)
Basically, I want to save an encrypted data (from a clear text) and retrieve a decrypted data (from the encrypted field value), without writing stored procedure on my own.
I know I can solve my problem it by creating a custom SQL Stored Procedure for both Save() and Load*() methods, but it seems to me that a tool like CodeFluent Entities might provide a way to feed my needs.
Thanks to anyone that can help me on that ;)