Example #1
0
        public bool AddReadCount(string noteId)
        {
            try
            {
                var note = noteRepos.Get(noteId);
                note.ReadCount += 1;

                noteRepos.Update(note);
                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }
Example #2
0
 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);
     }
 }