public void DeleteItem(LexEntry item) { if (item == null) { throw new ArgumentNullException("item"); } var args = new EntryEventArgs(item); _caches.DeleteItemFromCaches(item); _decoratedDataMapper.DeleteItem(item); if (AfterEntryDeleted != null) { AfterEntryDeleted(this, args); } }
public void DeleteItem(RepositoryId id) { if (id == null) { throw new ArgumentNullException("id"); } if (!_primarySecondaryMap.ContainsKey(id)) { throw new ArgumentOutOfRangeException("id", "Item does not exist in repository"); } _secondary.DeleteItem(_primarySecondaryMap[id]); _primary.DeleteItem(id); _primarySecondaryMap.Remove(id); }