You can search as follows if the data is already materialized
Example in https://dotnetfiddle.net/uSnmsJ:
query = query.Where(x => new[] { x.Campo1, x.Campo2, x.Campo3}.Any(s => s.Contains(filter)));
For data not materialized, ie, that will be recovered by some ORM (ex. Nhibernate) maybe this does not work, because it will convert to sql, make the test and inform. Search all data with a Tolist() and search the materialized data. If the table is not too large it will run in an acceptable time.
I updated the example in https://dotnetfiddle.net/uSnmsJ creating a filtered list2 searching for all attributes.
var listaFiltrada2 = lista.Where(m => m.GetType().GetProperties().Any(x => x.GetValue(m, null) != null && x.GetValue(m, null).ToString().Contains("Marco"))).ToList();
I did not understand why, first, because this query is bad and if the research is done in several fields could use another technique outside the Entity Framework, now if you need to be all fields there is nothing automatic or generic, you do need to pass the fields and maybe this is a single time, sincerity is just what you do and if you are going to do a pure SQL, you will also have to pass the fields, I already think about it.???
– novic
This does not use EF or other ORM?
– Maniero