using System.Collections.Generic;
public class FindPersonResultsViewModel
public int PersonID { get; set; }
public bool ExistInContactManager { get; set; }
public bool ActionType { get; set; }
public class PersonViewModel
public int PersonID { get; set; }
public static void Main()
var findPersonResultsViewModel = new List<FindPersonResultsViewModel>()
{ new FindPersonResultsViewModel { PersonID = 2, ActionType = false, ExistInContactManager = false },
new FindPersonResultsViewModel { PersonID = 3, ActionType = false, ExistInContactManager = false },
new FindPersonResultsViewModel { PersonID = 4, ActionType = false, ExistInContactManager = false },
new FindPersonResultsViewModel { PersonID = 5, ActionType = false, ExistInContactManager = false },
new FindPersonResultsViewModel { PersonID = 6, ActionType = false, ExistInContactManager = false },
var personModel = new List<PersonViewModel>()
{ new PersonViewModel { PersonID = 2 },
new PersonViewModel { PersonID = 6 },
new PersonViewModel { PersonID = 8 },
new PersonViewModel { PersonID = 9 },
new PersonViewModel { PersonID = 12 },
new PersonViewModel { PersonID = 22 },
new PersonViewModel { PersonID = 32 },
new PersonViewModel { PersonID = 42 },
from pr in findPersonResultsViewModel
join p in personModel on pr.PersonID equals p.PersonID
foreach (var item in query)
item.ExistInContactManager = true;
foreach (var item in findPersonResultsViewModel)
Console.WriteLine("PersonID : " + item.PersonID + ", ActionType :" + item.ActionType + ", ExistInContactManager :" + item.ExistInContactManager);