query no case sensitive with Contains string
Posted: Sat 23 Mar 2019 08:38
Hi, can anyone tell me how you can make it so that in the non-match between strings it's not case sensitive in a query?
var list = (from p in context.Patient
where p.Name.Contains (query) || p.Cognome.Contains (query)
orderby p.Name, p.Cognome
select p) .ToList ();
In this query the contains is case sensitive and therefore does not return a correct result. how can I do?
var list = (from p in context.Patient
where p.Name.Contains (query) || p.Cognome.Contains (query)
orderby p.Name, p.Cognome
select p) .ToList ();
In this query the contains is case sensitive and therefore does not return a correct result. how can I do?