Beispiel #1
0
        public async Task <bool> Handle(CreateVacancies request, CancellationToken cancellationToken)
        {
            try
            {
                var result   = _mapper.Map <Vacancies>(request.CreateVacanciesDto);
                var response = await _repository.CreateAsync(result);

                await _repository.SaveAsync(cancellationToken);

                return(response);
            }
            catch (Exception e)
            {
                _logger.LogError(nameof(CreateVacanciesHandler.Handle), e);
                return(false);
            }
        }