コード例 #1
0
        /// <summary>
        /// Remove a book with a given id from BookStorage
        /// </summary>
        /// <param name="id"> Id </param>
        public void Remove(int id)
        {
            Book book = GetById(id);

            if (book != null)
            {
                _db.Remove(book);
            }
            else
            {
                throw new ArgumentException("There is no such book in the BookStorage!");
            }
        }