Esempio n. 1
0
        public async Task <ActionResult <BasketItemViewModel> > GetItem(int id)
        {
            BasketItemViewModel item = await _basketViewModelService.GetBasketItemForUserAsync(User.Identity.Name, id);

            if (item == null)
            {
                return(NotFound(string.Format(ErrorMessage.BasketWithItemIdDoesntExists, id)));
            }
            return(item);
        }