public List <ApplicantDto> GetApplicants() { List <Applicant> listOfApplicant = _applicantrepository.GetAll().ToList(); var result = _mapper.Map <List <ApplicantDto> >(listOfApplicant); return(result); }
public void AddApplicant(Applicant applicant) { IApplicantRepository repo = RepoFactory.CreateApplicantRepository(); applicant.ApplicantID = GetApplicantID(repo.GetAll()); repo.AddApplicant(applicant); }
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); }
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); }
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()); }
public IEnumerable <Applicant> GetApplicants() { return(_applicantRepository.GetAll().OrderBy(x => x.Id)); }
public IEnumerable <Applicant> GetAll() { return(appRepo.GetAll()); }
public async Task <List <ApplicantViewModel> > GetAll() { return(await _applicantRepository.GetAll()); }
public IOrderedQueryable <Applicant> GetAll() { var result = _repository.GetAll(); return(result); }
public IEnumerable <Applicant> getAllApplicant() { return(_applicantRepository.GetAll()); }
public async Task <IActionResult> GetAll() { var result = await _repository.GetAll(); return(new JsonResult(result)); }
public async Task <IList <Applicant> > GetAll() { return(await _repository.GetAll()); }
public List <Applicant> GetAll() { var result = _repository.GetAll(); return(result); }