public ActionResult Create(JobModel jobModel)
        {
            if (ModelState.IsValid)
            {
                var newJob = new Job
                {
                    Name        = jobModel.Name,
                    JobCategory = jobModel.JobCategory,
                    JobType     = jobModel.JobType,
                    SkillId     = jobModel.SkillId,
                    SkillLevel  = jobModel.SkillLevel
                };

                // get skill
                newJob.Skill = db.Skills.Single(x => x.Id == jobModel.SkillId);

                // get process(es)
                foreach (var id in jobModel.SelectedProcessIds)
                {
                    var proc = db.Processes.Single(x => x.Id == id);
                    newJob.Processes.Add(proc);
                    proc.Jobs.Add(newJob);
                }

                // get labor(s)
                foreach (var id in jobModel.SelectedLaborIds)
                {
                    var labor = db.Products.Single(x => x.Id == id);
                    newJob.Labor.Add(labor);
                    labor.Jobs.Add(newJob);
                }

                // get related job(s)
                foreach (var id in jobModel.SelectedRelatedJobIds)
                {
                    var otherJob = db.Jobs.Single(x => x.Id == id);
                    newJob.AddRelatedJob(otherJob);
                }

                db.Jobs.Add(newJob);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.SkillId = new SelectList(db.Skills, "Id", "Name", jobModel.SkillId);
            return(View(jobModel));
        }