-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Case insensitive operations #10
Comments
No, it is not possible, because encrypted fields can only be searched for an exact match. (Otherwise the encryption would be pointless. On the database side, all encrypted fields are stored as binary data.) It is only going to make a case insenitive match so that the lowercase value is stored in the encrypted column. |
Ok, clear. Need to understand how to combine this with a table with potentially million of records. Thank you for your answer. |
Like this. If it is to be searched (substring, compare numbers,...) by column or indexed, it cannot be encrypted in the database. If the column is encrypted with the option If the column is encrypted with the option |
The column is encrypted with the option
I totally understand that this two requirements are not coherent, at least with the solutions available right now. The point is that we have a lot of data in that table, at the moment the only way is to retrieve all the information from the DB (translate the entities to a list of entities) then search on the list, in stead of let SQLServer search for the records and return only the records that match. |
Hello,
is there any way to perform a case insensitive operation on an encrypted field?
What I would like to execute is something like:
ClassName = ClassName.Where(CN => CN.Surname.ToLower().Contains(Value.ToLower()));
or even better:
ClassName = ClassName.Where(CN => CN.Surname.Contains(Value, StringComparison.OrdinalIgnoreCase));
or finally:
ClassName = ClassName.Where(CN => CN.Surname.IndexOf(Value, StringComparison.OrdinalIgnoreCase) >= 0);
At the moment I am converting everything to list, then performing the where on "client side".
Thanks,
Michele
The text was updated successfully, but these errors were encountered: