public Response <List <Dto.Model.Applicant> > GetApplicants() { var applicants = _applicantRepository.GetApplicants().MapToDtos(); return(new Response <List <Dto.Model.Applicant> >() { Data = applicants }); }
public Response GetAllApplicant() { _logger.LogInformation($"Retrieving all applicants..."); Response response = _utilities.InitializeResponse(); response.Data = _applicantRepository.GetApplicants(); return(response); }
public IActionResult GetApplicant() { var applicants = _context.GetApplicants().OrderBy(x => x.ApplicantId); if (applicants == null) { return(new OkObjectResult("Applicant Information not found")); } return(new OkObjectResult(applicants)); }
public async Task <ActionResult> GetApplicants() { try { return(Ok(await applicantRepository.GetApplicants())); } catch (Exception) { return(StatusCode(StatusCodes.Status500InternalServerError, "Accessing database error!")); } }
public async Task <ActionResult> GetApplicants() { try { Log.Debug($"{Section.GetValue<string>("DebugAPIget")}{nameof(GetApplicants)}\nCode: [{Code200}]"); return(Ok(await applicantRepository.GetApplicants())); } catch (Exception err) { Log.Error($"Exception occured: [{err}]\nStatusCode:{Code500}"); return(StatusCode(Code500, Section.GetValue <string>("RetreiveFromDbError"))); } }
// GET: Applicant public ActionResult Index() { var applicants = _repository.GetApplicants().ToList(); return(View(applicants)); }
// GET: Jobs/Create public IActionResult Create() { ViewData["ApplicantId"] = new SelectList(_applicantRepository.GetApplicants(), "Id", "Name"); ViewData["RoleId"] = new SelectList(_roleRepository.GetRoles(), "Id", "RoleName"); return(View()); }
// GET: Applicants public IActionResult Index() { return(View(_applicantRepository.GetApplicants())); }
public async Task <IEnumerable <Core.Applicant.Applicant> > GetApplicants() { return(await _repository.GetApplicants()); }