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} }}"); }
private bool IsCategoryInList(Category category) { return(BookCategories.Select(e => e.Category).Contains(category)); }