27.(linq)linq模糊查询 contains 和indexof
n.Name.StartsWith(Name) //-A%
n.Name.EndsWith(Name) //-%A
n.Name.IndexOf(Name)!=-1 //- %A%
var listWhere = list.Where(n=>n.Name.StartsWith(Name)||n.Name.EndsWith(Name)||n.Name.IndexOf(Name)!=-1);
或
var listWhere = list.Where(n=>n.Name.Contains(Name));