public ActionResult HandlingPlan(int patientId, int treeId) { var patient = patientRepository.GetPatient(patientId); List<Solution> solutions = new List<Solution>(); solutions.Add(treeRepository.GetHandlingPlan(patientId, treeId)); SolutionsVM solutionsVM = new SolutionsVM { Patient = patient, Solutions = solutions }; return View("SolutionSet", solutionsVM); }
public ActionResult HandlingPlanSet(int patientId) { var patient = patientRepository.GetPatient(patientId); SolutionsVM solutionsVM = new SolutionsVM { Patient = patient, Solutions = new List<Solution>() }; foreach(var tree in db.Trees.ToList()) { var solution = treeRepository.GetHandlingPlan(patientId, tree.ID); solutionsVM.Solutions.Add(solution); } return View("SolutionSet",solutionsVM); }