public ActionResult VacanciesForCandidate(int id)
        {
            if (UserDAL.GetUserByName(User.Identity.Name).Role == Enum.Role.employer)
            {
                return(RedirectToAction("Index", "Home"));
            }
            var model = VacancyDAL.SearchForVacancy(CandidateDAL.GetCandidateById(id).KeyWords, CandidateDAL.GetCandidateById(id).WorkExpirience);

            return(View("VacanciesForCandidate", model));
        }
        public ActionResult CandidateDetails(int id)
        {
            if (CandidateDAL.GetCandidateById(id) != null)
            {
                if (UserDAL.GetUserByName(User.Identity.Name).Role == Enum.Role.candidate && UserDAL.GetUserByName(User.Identity.Name).Id != CandidateDAL.GetCandidateById(id).UserId.Id)
                {
                    return(RedirectToAction("Index", "Home"));
                }
            }
            var model = CandidateDAL.GetCandidateById(id);

            return(View(model));
        }