Exemplo n.º 1
0
        public async Task CreateApplication(JobApplicationCreateDto jobApplication)
        {
            using (var uow = UnitOfWorkProvider.Create())
            {
                await jobApplicationService.Create(jobApplication);

                await uow.Commit();
            }
        }
        public async Task <ActionResult <JobApplicationDto> > Create(JobApplicationDto_Create objectToCreate)
        {
            var toCreate = await _jobApplicationService.Create(_jobApplicationMapper.Dto_CreateToDomain(objectToCreate));

            var selectionStep = await _screeningService.GetActiveScreeningStepForJobApplicationId(toCreate.Id);

            if (string.IsNullOrEmpty(selectionStep))
            {
                selectionStep = "CV";
            }

            _loggerManager.LogInfo($"jobapplication created with id {toCreate.Id}");
            return(_jobApplicationMapper.DomainToDto(toCreate, selectionStep));
        }