// Exceptions: // System.ArgumentException: // eventBase is null when saving EventBase public void Save(EventBase eventBase) { if (eventBase.IsNull) { SaveInternal(eventBase); return; //throw new System.ArgumentException("eventBase is null when saving EventBase", "eventBase"); } if (EventBaseExists(eventBase.UniqueID)) { EventBase upToDateEventBase = new EventBase(); try { Load(upToDateEventBase, eventBase.UniqueID); } catch { SaveInternal(eventBase); return; } if (eventBase.CompareTo(upToDateEventBase) != 0) { UpdateInternal(eventBase); } } else { SaveInternal(eventBase); } }