Example #1
0
        public ActionResult Details(int?id)
        {
            ViewBag.SelectedNav = "Jobs";
            JobListing jobListing = _jobListingsRepository.GetJobListingById(id);

            return(View(jobListing));
        }
        public ActionResult Details(int?id)
        {
            int userIdCurrentlyLoggedIn = Int32.Parse(User.Claims.FirstOrDefault(uc => uc.Type == ClaimTypes.NameIdentifier).Value);

            if (id == null)
            {
                return(NotFound());
            }

            JobListing jobListing = _jobListingsRepository.GetJobListingById(id);

            if (jobListing == null)
            {
                return(NotFound());
            }
            ViewBag.SelectedNav = "Dashboard";
            return(View(jobListing));
        }