public ActionResult Assignment(int?id) { if (!id.HasValue) { throw new EntryPointNotFoundException(); } int realId = id.Value; AssignmentViewModel model = _assignmentService.GetAssignmentById(realId); return(PartialView(model)); }
//the method that is called to see details for an assignment public ActionResult Details(int id) { var viewModel = _service.GetAssignmentById(id); // creates a viewmodel for the assignment return(View(viewModel)); }