Ejemplo n.º 1
0
        public async Task <IActionResult> GetCardByIdAsync([FromRoute] int id)
        {
            var card = await _cardsService.GetCardByIdAsync(id);

            if (card == null)
            {
                return(NotFound());
            }

            var response = new CardResponse
            {
                Id          = card.Id,
                Name        = card.Name,
                Description = card.Description
            };

            return(Ok(response));
        }