Пример #1
0
        public void AddToWishList(int productId, int userId)
        {
            var item = _wishListRepository.GetWishListItem(productId, userId);

            if (item == null)
            {
                _wishListRepository.AddWishListItem(productId, userId, DateTime.Now);
            }

            else
            {
                throw new BgsException((int)WebApiErrorCodes.ThisItemAlreadyInWishList);
            }
        }