示例#1
0
        private void MigratorCommentator(Tafsir commentator)
        {
            Logger.Debug($"Commentary {commentator.Code}");
            var commentatorViewModel = new CommentatorViewModel(
                code: commentator.Code,
                description: commentator.Mufassir);

            CommentatorWriteRepository.Write(commentatorViewModel);

            foreach (TafsirComment commentary in commentator.Comments)
            {
                var commentaryViewModel = new CommentaryViewModel(
                    commentatorCode: commentator.Code,
                    chapterNumber: commentary.VerseReference.Chapter,
                    firstVerseNumber: commentary.VerseReference.FirstVerse,
                    lastVerseNumber: commentary.VerseReference.LastVerse,
                    text: commentary.Text.Select(x => TextContent.Create(x)));
                CommentaryWriteRepository.Write(commentaryViewModel);
            }
        }