Monday 15 September 2014

.net - Mapping user defined types in entity framework -


We want to use a user-defined type and in that way the unit is mapped separately to the framework.

This type is defined in the SQL server:

  Type the VARCHAR (max) tap from the encrypted SSN;   

And this type of encrypted data is stored, so we want to show the column type when used in code. Instead of type EncryptedSSN , type is Varchar (max) .

We use handlers for columns based on the data type. Since the entity framework does not support encrypted columns, we want to encrypt some areas and want to handle encryption invisibly in the remaining code. There are other columns which are defined as varchar (max), so it is not possible to filter them by those criteria.

We understand that the unit framework does not support user-defined types in CLR. If this is wrong, please tell me otherwise.

How can we get EncryptedSSN to appear in the model browser?

This is crude, but you can call varchar (some_number_which_is_unlikely_to_be_used_for_another_purpose)

No comments:

Post a Comment