public async Task <IActionResult> Create(PaymentCulturalExchangeViewModel paymentCulturalExchangeViewModel)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    var culturalExchange = _culturalExchangeAppService.GetById(paymentCulturalExchangeViewModel.CulturalExchangeId);

                    paymentCulturalExchangeViewModel.FileName = await _fileUploadAppService.Upload(
                        _appSetttings.Value.UploadFilePath + culturalExchange.Id, null, paymentCulturalExchangeViewModel.File);

                    paymentCulturalExchangeViewModel = _paymentCulturalExchangeAppService.Add(paymentCulturalExchangeViewModel);

                    if (!paymentCulturalExchangeViewModel.ValidationResult.Any())
                    {
                        return(RedirectToAction("Index", "ReceivePaymentCulturalExchange"));
                    }
                }

                return(Json(Conflict()));
            }
            catch (Exception ex)
            {
                _fileUploadAppService.Delete(_appSetttings.Value.UploadFilePath, paymentCulturalExchangeViewModel.FileName);
                return(Json(BadRequest()));
            }
        }
        public PaymentCulturalExchangeViewModel Update(Guid idEnvironment, PaymentCulturalExchangeViewModel paymentVM)
        {
            var entity = _mapper.Map <PaymentCulturalExchange>(paymentVM);

            return(_mapper.Map <PaymentCulturalExchangeViewModel>(_paymentCulturalExchangeService.Update(idEnvironment, entity)));
        }
        public PaymentCulturalExchangeViewModel Add(PaymentCulturalExchangeViewModel paymentVM)
        {
            var entity = _mapper.Map <PaymentCulturalExchange>(paymentVM);

            return(_mapper.Map <PaymentCulturalExchangeViewModel>(_paymentCulturalExchangeService.Add(entity)));
        }