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

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

            applicant.ApplicantID = GetApplicantID(repo.GetAll());
            repo.AddApplicant(applicant);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 8
0
 public async Task <IEnumerable <Applicant> > GetAllApplicants()
 {
     return(await _applicantRepository.GetAll().ToListAsync());
 }
Ejemplo n.º 9
0
 public IEnumerable <Applicant> GetApplicants()
 {
     return(_applicantRepository.GetAll().OrderBy(x => x.Id));
 }
 public IEnumerable <Applicant> GetAll()
 {
     return(appRepo.GetAll());
 }
Ejemplo n.º 11
0
 public async Task <List <ApplicantViewModel> > GetAll()
 {
     return(await _applicantRepository.GetAll());
 }
Ejemplo n.º 12
0
        public IOrderedQueryable <Applicant> GetAll()
        {
            var result = _repository.GetAll();

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

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

            return(result);
        }