Exemple #1
0
        public async Task <IResult> AddAsync(LocalIndividualCurrentCardAddDto localIndividualCurrentCardAddDto)
        {
            var mappedEntity = _mapper.Map <LocalIndividualCurrentCard>(localIndividualCurrentCardAddDto);

            var result = await _localIndividualCurrentCardDal.AddAsync(mappedEntity);

            if (!result)
            {
                return(new ErrorResult(Messages.LocalIndividualCurrentCardNotAdded));
            }

            return(new SuccessResult(Messages.LocalIndividualCurrentCardAdded));
        }
Exemple #2
0
        public async Task <IActionResult> AddAsync(LocalIndividualCurrentCardAddDto localIndividualCurrentCardAddDto)
        {
            var result = await _localIndividualCurrentCardService.AddAsync(localIndividualCurrentCardAddDto);

            return(result.Success == false?BadRequest(result) : Ok(result));
        }