Exemple #1
0
        public void Handle(DeleteCommentCommand command)
        {
            //TODO: the deleteComment needs optmistic lock -> add lesson version!!
            //Lesson lesson = repo.GetById<Lesson>(command.Id, command.Version);
            Lesson lesson = repo.GetById <Lesson>(command.Id);

            lesson.DeleteComment(command.CommentId, command.Date);
            repo.Save(lesson, Guid.NewGuid());
        }