C# search query with linq
I think you just have it backwards:
mycontext.persons
.Where(t =>
t.Firstname.Contains(search) ||
t.Lastname.Contains(search) ||
t.Description.Contains(search))
.ToList();
One possible (but probably not the most optimized solution) would be to append all of your fields together and do a Contains
on the search term., e.g.
var result = persons.Where(q => (q.Description + " " q.FirstName + " " q.LastName)
.ToLower()
.Contains(searchTerm.ToLower()))
.ToList();