public IActionResult Index() { CandidateWrapperViewModel model = new CandidateWrapperViewModel(); model = _candidateService.GetCandidateList(); return(View(model)); }
public CandidateWrapperViewModel GetCandidateList() { CandidateWrapperViewModel model = new CandidateWrapperViewModel(); List <CandidateViewModel> list = _candidateRepository.GetAllCandidates(); model.CandidateList = list.Select(x => new CandidateViewModel { Id = x.Id, Name = x.Name, CreatedOn = x.CreatedOn, ModifiedOn = x.ModifiedOn, EmailId = x.EmailId, Password = x.Password, MobileNumber = x.MobileNumber, AppliedFor = x.AppliedFor, TestId = x.TestId }).ToList(); return(model); }