Example #1
0
        public static ReadingCategoryVM ToReadingCategoryVM(this ReadingCategory <ReadingWord> category)
        {
            var vm = new ReadingCategoryVM
            {
                Id    = category.Id,
                Title = category.Title,
                Cards = category.ReadingCards.Select(x => x.TextOnTheCard)
            };

            return(vm);
        }
 public static bool AreEqual(ReadingCategory <ReadingWord> expected, ReadingCategoryVM actual)
 {
     AreEqual(expected.Title, actual.Title);
     AreEqual(expected.ReadingCards.Select(x => x.TextOnTheCard), actual.Cards, AreEqual);
     return(true);
 }