コード例 #1
0
 private void PrepareQuizCommentModel(QuizCommentModel model, QuizComment comment)
 {
     model.CommentId  = comment.CommentId;
     model.CreatedUtc = comment.CreatedUtc;
     model.Comment    = comment.Comment;
     model.QuizId     = comment.QuizId;
 }
コード例 #2
0
        public void CreateComment(int quizId, string comment)
        {
            var quizComment = new QuizComment
            {
                QuizId     = quizId,
                CreatedUtc = DateTime.UtcNow,
                Comment    = comment
            };

            _quizCommentRepository.Insert(quizComment);
        }