/// <summary> /// 将当前列表中所有的组合对象树都标记为未变更状态。 /// </summary> public void MarkSaved() { _deletedList = null; for (int i = 0, c = this.Count; i < c; i++) { var entity = this[i]; var child = entity as IDirtyAware; child.MarkSaved(); } }
/// <summary> /// 将当前列表中所有的组合对象树都标记为未变更状态。 /// </summary> public void MarkSaved() { _deletedList = null; foreach (var child in this) { if (child.IsDirty) { var childEntity = child as IDirtyAware; if (childEntity != null) { childEntity.MarkSaved(); } } } }