You could try
List<int> idsToUpdate = new List<int>(new int[] { 1, 2, 10, 55, 102 });
var personsToUpdate = mycontextentities.PERSON.Where
(
p => idsToUpdate.Contains(p.PERSONID)
);
foreach (PERSON p in personsToUpdate)
{
p.DepartmentCode = "A3";
}
mycontextentities.SaveChanges();