views:

118

answers:

3

Currently i am using sql encryption and would like to continue using it through Linq. I have all my CRUD stored proc's wired up to the table in order to handle the encryption/decryption on the backend. Problem is my database model see's a field type of varbinary(max) which is used for the sql encryption storage. The retrieval sp for this table does the decryption thus returning a string value. How does one get around this. Seems like the model needs to recognize a string in place of the varbinary but i am unsure of how to handle this. Thanks in advance.

A: 

Off the top of my head, some choices:

  1. Edit the ssdl manually.
  2. Make a view and map that (you don't need to actually use it for anything but mapping).
Craig Stuntz
+1  A: 

So change the table mapping to a view mapping in the database model?

Billy Logan
+1  A: 

This is very similar to the follow question:

http://stackoverflow.com/questions/1244800/mvc-using-linq-to-entity-w-sql-encryption

Shiraz Bhaiji