public bool RemoveById(int id) { bool removeResult = _awards.Remove(id); if (removeResult) { DeleteAward?.Invoke(id); } return(removeResult); }
/// <summary> /// Removes Award with specified ID from the collection. /// </summary> /// <param name="id">ID of Award to be removed.</param> /// <returns> /// True if Award is removed. /// False if removing is impossible. /// </returns> public bool RemoveById(int id) { bool removeResult = _awards.Remove(id); if (removeResult) { IncrementOperationNumber(); DeleteAward?.Invoke(id); } return(removeResult); }