public ActionResult Update(int commentId, string comment) { if (!Context.PersonId.HasValue) { throw new UnassignedUserException(); } var res = SchoolLocator.TeacherCommentService.EditComment(commentId, Context.PersonId.Value, comment); return(Json(TeacherCommentViewData.Create(res))); }
public ActionResult CommentsList(int teacherId) { var res = SchoolLocator.TeacherCommentService.GetComments(teacherId); return(Json(TeacherCommentViewData.Create(res))); }