Пример #1
0
 public static Topic FindTopic(Chapter chapter, string topicName)
 {
   return string.IsNullOrEmpty(topicName)
       ? null
       : chapter.Topics.FirstOrDefault(topic => string.Compare(topic.Name, topicName, StringComparison.OrdinalIgnoreCase) == 0);
 }
 public ChapterModel(Chapter chapter)
 {
   Name = chapter.Name.Trim();
   SortOrder = chapter.SortOrder;
   Topics = TopicModel.FromTopicList(chapter.Topics);
 }