I have to find string items in FirstName and LastName column will have data with one or more words as shown below. I need to find the matching records which the search text should satisfy at least anyone word in both columns.
i.e : FirstName and LastName. How to search using LINQ query?
In database:
FirstName: Ashok Kumar
LastName: Mahesh Prasad
SearchText = ashok mahesh abc xyz
Here ashok is matching in Firstname and mahesh is matching in lastname. How to search this using below LINQ query?
Sample Linq Query:
getQuery = (_uow.GetRepository<EntityModel.UserOrganization>().GetAll().Where ( x => x.User.FirstName.ToLower().Contains(SearchText.ToLower()) )
Thanks in advance