Exemplo n.º 1
0
        public async Task <JsonResult> AddBasketJson([FromBody] BasketDTO basketDTO)
        {
            var basket = _mapper.Map <BasketDTO, Basket>(basketDTO);


            _logger.LogInformation("testlog123");
            //var newBasket = await _basketService.AddBasket(basket);
            var newBasket = await _basketService.AddBasketApiResponseTest(basket);

            return(Json(newBasket));
            //if (newBasket.IsSuccess == false)
            //{
            //    return NotFound(newBasket.Message);
            //}

            //return Created("", basketDTO);
        }