Esempio n. 1
0
        public async Task <bool> AcceptApplication(int applicationId, EmployerDto managingEmployer)
        {
            using (var unitOfWork = UnitOfWorkProvider.Create())
            {
                if ((await jobApplicationService.GetAsync(applicationId)).JobOffer.Employer.Id != managingEmployer.Id)
                {
                    throw new ArgumentException();
                }

                var result = await jobApplicationService.AcceptApplication(applicationId);

                await unitOfWork.Commit();

                return(result);
            }
        }