public ActionResult Edit(AssignmentViewModel assignmentViewModel) { if (ModelState.IsValid) { _repository.AssignmentSaveChanges(assignmentViewModel.AssignmentDetail); return(RedirectToAction("Index")); } return(View(assignmentViewModel)); }