How do I pass a list of strings to contain?
var test= _context.TableName.Where(e => e.type == "icon" && e.Code.Contains("list of string"));
Regards
How do I pass a list of strings to contain?
var test= _context.TableName.Where(e => e.type == "icon" && e.Code.Contains("list of string"));
Regards
Without knowing the details it is somewhat difficult to suggest something but you could just do it in the opposite way:
var test = _context.TableName.Where(e => e.type == "icon" && listOfString.Any(e.Code.Contains));
This should be enough
var setOfStrings = new HashSet(){"string1", "string2"};
var test = _context.TableName.Where(e => e.type == "icon" && setOfStrings.Contains(e.Code));