public Response DeleteApplicantById(int id)
        {
            Response response  = _utilities.InitializeResponse();
            var      applicant = _applicantRepository.GetApplicantByID(id);

            if (applicant == null)
            {
                return(_utilities.UnsuccessfulResponse(response, "Invalid id supplied. Could not match applicant to id"));
            }

            _applicantRepository.DeleteApplicant(id);
            _applicantRepository.Save();
            _logger.LogInformation($"Successfully deleted applicant {id}");

            return(response);
        }
        public Response <Dto.Model.Applicant> GetApplicantByID(int applicantID)
        {
            var result = _applicantRepository.GetApplicantByID(applicantID);

            if (result == null)
            {
                throw new ArgumentException("No applicants were found");
            }

            var applicant = result.MapToDto();

            return(new Response <Dto.Model.Applicant>()
            {
                Data = applicant
            });
        }