Hello
I have this piece of code:
Schedule chk = _entities.Schedules.Where(x => x.ScheduleStart == schedule.ScheduleStart && x.ScheduleEnd <= schedule.ScheduleEnd).FirstOrDefault();
if (chk != null)
{
chk.Discontinued = true;
_entities.SavingChanges();
}
basically if something exists in database with that criteria, set discontinued = true and save...
but I get this error:
The event 'System.Data.Objects.ObjectContext.SavingChanges' can only appear on the left hand side of += or -=
What is wrong?
/M