예제 #1
0
 public void InsertComment(INewCommentDto dto)
 {
     Context.Comments.InsertOnSubmit(new Comment
     {
         CreationDate   = DateTime.Now,
         ExerciseLevel  = dto.ExerciseLevel,
         ExerciseNumber = dto.ExerciseNumber,
         UserId         = dto.UserId,
         UserComment    = dto.CommentText
     });
     Context.SubmitChanges();
 }
 public void AddNewComment(INewCommentDto dto)
 {
     _commentsRepository.InsertComment(dto);
 }