✅ Cannot convert from string[] to 'char' [SOLVED]

Hi, I'm getting this error that I am converting from string[] to char. The data type for the field I am trying to retrieve isn't char but string. Somehow, I receive this error message.
var allLocations = new[] { "PlaceOne", "PlaceTwo" };

var locations = _context.CityLocations.Where(x => x.Location.Contains(allLocations)).ToList(); //Cannot convert from string[] to 'char'
var allLocations = new[] { "PlaceOne", "PlaceTwo" };

var locations = _context.CityLocations.Where(x => x.Location.Contains(allLocations)).ToList(); //Cannot convert from string[] to 'char'
3 Replies
Patrick
Patrick2y ago
allLocations.Contains(x.Location)
CoreVisional
CoreVisionalOP2y ago
Ahh...alright, it's solved now. Thank you.
Accord
Accord2y ago
Closed!
Want results from more Discord servers?
Add your server