Exemplo n.º 1
0
        public async Task <IActionResult> CreateCard(CardForCreateDto card)
        {
            if (await _repo.CreateCard(card.AccountId, card.CardType))
            {
                return(Ok());
            }

            return(Unauthorized());
        }
        public async Task <IActionResult> CreateCard(CardForCreateDto cardData)
        {
            var card = _mapper.Map <Card>(cardData);

            _repo.Add(card);
            if (await _repo.SaveAll())
            {
                return(Ok());
            }
            return(BadRequest());
        }