public void DeleteObject(BaseNonPersistent obj) { var found = FindObject(obj.ID); if (found != null) { objects.Remove(found); } }
public void SaveObject(BaseNonPersistent obj) { var found = FindObject(obj.ID); if (found != null) { objects.Remove(found); } objects.Add(obj.Clone(this)); obj.NPOnSaving(obj.ObjectSpace); }
public void Add(BaseNonPersistent obj) { objects.Add(obj); }
public virtual void CopyTo(BaseNonPersistent target, IObjectMap map) { throw new Exception("CopyTo needs to be overriden"); }
private BaseNonPersistent GetObject(BaseNonPersistent obj) { return(!objectSpace.IsNewObject(obj) ? GetObjectByKey(obj.ID) : obj); }