Skip to content

Instantly share code, notes, and snippets.

@obegendi
Created March 11, 2018 21:32
Show Gist options
  • Save obegendi/318415ace2c0e737f16e26ed13916e00 to your computer and use it in GitHub Desktop.
Save obegendi/318415ace2c0e737f16e26ed13916e00 to your computer and use it in GitHub Desktop.
foreach (var city in cities){
var city = context.City.Where(x => list.Contains(x.Name)).ToList();
}
var cityList = context.City.ToList();
foreach (var city in cityList){
var city = cityList.Where(x => x.Name.Contains(city));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment