public async Task <IActionResult> Post([FromBody] ViewCardDto viewCardDto)
        {
            if (!User.Identity.IsAuthenticated)
            {
                throw new AuthenticationException();
            }
            var viewCard = _mapper.Map <ViewCard>(viewCardDto);
            await _viewCardService.InsertViewCard(viewCard);

            viewCardDto = _mapper.Map <ViewCardDto>(viewCard);
            var response = new ApiResponse <ViewCardDto>(viewCardDto);

            return(Ok(response));
        }
        public async Task <IActionResult> Put(int id, ViewCardDto viewCardDto)
        {
            if (!User.Identity.IsAuthenticated)
            {
                throw new AuthenticationException();
            }
            var viewCard = _mapper.Map <ViewCard>(viewCardDto);

            viewCard.Id = id;
            var result = await _viewCardService.UpdateViewCard(viewCard);

            var response = new ApiResponse <bool>(result);

            return(Ok(response));
        }