void RemoveOccurrances(string patternId)
        {
            var occurrances = db.CarSchedulings.Where(c => c.PatternId == patternId &&
                                                      (c.EventType == (int)AppointmentType.ChangedOccurrence || c.EventType == (int)AppointmentType.DeletedOccurrence)).ToList();

            db.RemoveRange(occurrances);
        }