public List <ApplicantDto> GetApplicants()
        {
            List <Applicant> listOfApplicant = _applicantrepository.GetAll().ToList();
            var result = _mapper.Map <List <ApplicantDto> >(listOfApplicant);

            return(result);
        }
Exemple #2
0
        public void AddApplicant(Applicant applicant)
        {
            IApplicantRepository repo = RepoFactory.CreateApplicantRepository();

            applicant.ApplicantID = GetApplicantID(repo.GetAll());
            repo.AddApplicant(applicant);
        }
Exemple #3
0
 public List <Applicant> GetAll()
 {
     try
     {
         return(_applicantRepository.GetAll().Result);
     }
     catch (Exception e)
     {
         throw;
     }
 }
        public IEnumerable <ApplicantModel> GetAll()
        {
            var applicants = _repository.GetAll();
            var result     = applicants?.Select(p => new ApplicantModel()
            {
                ID              = p.ID,
                Name            = p.Name,
                FamilyName      = p.FamilyName,
                Address         = p.Address,
                CountryOfOrigin = p.CountryOfOrigin,
                EMailAddress    = p.EMailAddress,
                Age             = p.Age,
                Hired           = p.Hired
            });

            return(result);
        }
Exemple #5
0
        public ListApplicantResponses ListApplicants()
        {
            IApplicantRepository   repo     = RepoFactory.CreateApplicantRepository();
            ListApplicantResponses response = new ListApplicantResponses();
            var applicants = repo.GetAll();

            if (applicants.Count == 0)
            {
                response.Success = false;
                response.Message = "No applicants found.";
            }
            else
            {
                response.Success    = true;
                response.applicants = applicants;
            }

            return(response);
        }
Exemple #6
0
        public async Task <List <ApplicantDto> > GetAll()
        {
            try
            {
                var applicants = await _applicantRepository.GetAll();

                return(applicants.Select(i => new ApplicantDto()
                {
                    Id = i.Id,
                    Name = i.Name,
                    FamilyName = i.FamilyName,
                    Address = i.Address,
                    CountryOfOrigin = i.CountryOfOrigin,
                    EmailAddress = i.EmailAddress,
                    Age = i.Age,
                    Hired = i.Hired,
                }).ToList());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                throw;
            }
        }
        public async Task <List <ApplicantGet> > GetAll()
        {
            List <Applicant> people = await _applicantRepository.GetAll();

            return(_mapper.Map <List <ApplicantGet> >(people));
        }
 public async Task <IEnumerable <Applicant> > GetAllApplicants()
 {
     return(await _applicantRepository.GetAll().ToListAsync());
 }
Exemple #9
0
 public IEnumerable <Applicant> GetApplicants()
 {
     return(_applicantRepository.GetAll().OrderBy(x => x.Id));
 }
 public IEnumerable <Applicant> GetAll()
 {
     return(appRepo.GetAll());
 }
Exemple #11
0
 public async Task <List <ApplicantViewModel> > GetAll()
 {
     return(await _applicantRepository.GetAll());
 }
Exemple #12
0
        public IOrderedQueryable <Applicant> GetAll()
        {
            var result = _repository.GetAll();

            return(result);
        }
Exemple #13
0
 public IEnumerable <Applicant> getAllApplicant()
 {
     return(_applicantRepository.GetAll());
 }
        public async Task <IActionResult> GetAll()
        {
            var result = await _repository.GetAll();

            return(new JsonResult(result));
        }
Exemple #15
0
 public async Task <IList <Applicant> > GetAll()
 {
     return(await _repository.GetAll());
 }
Exemple #16
0
        public List <Applicant> GetAll()
        {
            var result = _repository.GetAll();

            return(result);
        }