I have the following search query:
IQueryable<File> files = GetFiles(f => f.Clients.Any(fc => fc.Contacts.Any(c => c.Companies.Any(x => x.Name.Contains(searchText)))));
Unfortunately the search for Companies.Name
will never work because the Name
is encrypted.
So I have the following list of decrypted Companies
. It's a Stored Procedure and it uses SQL CLR to decrypt the Name
field:
List<Company> companies = GetSearchCompanies(searchText).Query.ToList();
This list is working fine, it returns a list of companies based on the searchText
.
My question is whether I can replace the original files
list of companies in order to be able to search against decrypted Company
names as well as the other searches against Contacts
, Clients
, etc.
Any help would be appreciated and thanks in advance.