public bool AddReadCount(string noteId) { try { var note = noteRepos.Get(noteId); note.ReadCount += 1; noteRepos.Update(note); return(true); } catch (Exception e) { return(false); } }
public bool SaveComment(NoteCommentInfo commnetInfo) { try { noteCommentRepository.Insert(commnetInfo); var note = learnNoteRepository.Get(commnetInfo.LearnNoteId); note.CommentCount += 1; learnNoteRepository.Update(note); return(true); } catch (Exception e) { return(false); } }