コード例 #1
0
        // The detail display for a given Job at URLs like /Job?id=17
        public IActionResult Index(int id)
        {
            TechJobs.Models.Job someJob = jobData.Find(id);
            // TODO #1 - get the Job with the given ID and pass it into the view
            SingleJobViewModel jobFieldsViewMode = new SingleJobViewModel();

            jobFieldsViewMode.bob = jobData.Find(id);
            return(View(jobFieldsViewMode));
        }
コード例 #2
0
        // The detail display for a given Job at URLs like /Job?id=17
        public IActionResult Index(int id)
        {
            // TODO #1 - get the Job with the given ID and pass it into the view
            //******************************************************************
            Job someJob = JobData.Find(id);
            SingleJobViewModel singleJobViewModel = new SingleJobViewModel();

            singleJobViewModel.Title = "Single Job Display";
            singleJobViewModel.job   = someJob;
            return(View(singleJobViewModel));
        }