public ActionResult Edit(int id) { var userId = WebSecurity.CurrentUserId; var userSkill = _skillRepository.GetUserSkill(id, userId); if (userSkill != null) { var editMark = new EditMark { Mark = userSkill.Mark, SkillName = userSkill.Skill.SkillName, SkillId = id }; return View(editMark); } return RedirectToAction("Index"); }
public ActionResult Edit(EditMark editMark) { var userId = WebSecurity.CurrentUserId; _skillRepository.UpdateUserSkill(editMark.SkillId, userId, editMark.Mark); sendUpdateMsg(); return RedirectToAction("Index"); }