I am currently looping through my Contact table and setting their IsCustomer
flag to false using a foreach
loop.
using (var db = new Entities(cs))
{
foreach (var contact in db.Contacts)
contact.IsCustomer = false;
db.SaveChanges();
}
I notice that this process is taking a long time. Is there a way to set all my Contacts IsCustomer
flag to false without setting them one by one? Or is there a faster way of doing this?