public virtual ActionResult Edit(int id) { try { return(PartialView("~/Views/Note/EditNote.cshtml", NoteDM.Get(id).Content)); } catch (Exception e) { Logger.Log("Edit note failed", e); return(View("~/Views/Shared/Error.cshtml")); } }
public virtual ActionResult ToggleLike(int userId, int noteId) { try { NoteDM.ToggleLike(userId, noteId); return(PartialView("~/Views/Note/Single.cshtml", Mapper.Map <DisplayNoteVM>(NoteDM.Get(noteId)))); } catch (Exception e) { Logger.Log("Like note failed", e); return(View("~/Views/Shared/Error.cshtml")); } }