示例#1
0
        public async Task <bool> RemoveWishlistBookAsync(WishlistBook item)
        {
            if (item == null)
            {
                throw new NullReferenceException("Wishlist book cannot be null");
            }

            if (item.Id < 0)
            {
                throw new Exception("Wishlist book id cannot be invalid");
            }

            return(await _repository.DeleteAsync(item));
        }