This question is locked. New answers and comments are not allowed.
I've got a textbox where I want a user to be able to type in a bunch of text and then I'll search my object collection for anything matching any of those values
So if they search for "steve" it returns anything with "steve"
however if they search for "steve april", it'll find anything with EITHER of those words
How much of a pain in the ass is this to do...how would one even do it...loop through each string and re-run the query over and over?
So if they search for "steve" it returns anything with "steve"
however if they search for "steve april", it'll find anything with EITHER of those words
How much of a pain in the ass is this to do...how would one even do it...loop through each string and re-run the query over and over?
(from r in scope.Extent<ViewAllRequest>() |
where r.ProgramName.Contains(programName) && |
(r.RotationName.Contains(searchText) || |
r.ResidentName.Contains(searchText) || |
r.SittingWith.Contains(searchText) || |
r.TypeName.Contains(searchText) || |
r.HospitalName.Contains(searchText) || |
r.AcademicYear.ToString().Contains(searchText) || |
r.Comments.Contains(searchText) || |
r.RequestID.ToString().ToLower().Contains(searchText)) |
orderby r.SubmittedDate descending |
select r).ToList(); |