Yes, this is because of the array. The Linq database provider can convert an array file into a very efficient form.
Namely, in terms of the database
SQL Like, SQL IN. .
SQL Like , .
SQL IN , IN .
, . Linq2Object, , , , , .
Linq2Object performant, HashSet, :
var keyWord = "Lyly,Tom,Jack,Rose";
var keyWordSet = new HashSet<string>(keyWord.split(','));
var students = Context.Students
.ToList()
.Where(i => keyWordSet.Contains(i.Name));