public async Task <GenericResponse> CreateCard(CardAppModel cardAppModel)
        {
            var card   = cardAppModel.ToEntity();
            var cardId = await _cardService.CreateCardAsync(card);

            await _unitOfWork.CommitAsync();

            return(new GenericResponse {
                Id = cardId
            });
        }
示例#2
0
 public static Card ToEntity(this CardAppModel model)
 {
     return(Mapper.Map <Card>(model));
 }
示例#3
0
        public async Task <ActionResult <GenericResponse> > CreateCardAsync([FromBody] CardAppModel cardAppModel)
        {
            var cardId = await _cardsApplicationService.CreateCard(cardAppModel);

            return(new OkObjectResult(cardId));
        }