コード例 #1
0
        public override string ToString()
        {
            var authors    = string.Join("|", Authors.Select(e => e.Name));
            var categories = string.Join('|', BookCategories.Select(e => e.Category.Name));

            return($"Book {{ Id = {Id}, ISBN = {Identifier}, Title = {Title}, Language = {Language}, Authors = {authors}, Categories = {categories} }}");
        }
コード例 #2
0
 private bool IsCategoryInList(Category category)
 {
     return(BookCategories.Select(e => e.Category).Contains(category));
 }