Fix category search indexing
This commit is contained in:
parent
3211b2dc85
commit
4e34834c35
2 changed files with 11 additions and 2 deletions
|
|
@ -61,7 +61,15 @@ namespace DataLayer
|
|||
.Distinct()
|
||||
.ToArray();
|
||||
|
||||
public static string[] CategoriesIds(this Book book)
|
||||
public static string[] AllCategoryNames(this Book book)
|
||||
=> book.CategoriesLink?.Any() is not true ? Array.Empty<string>()
|
||||
: book
|
||||
.CategoriesLink
|
||||
.SelectMany(cl => cl.CategoryLadder.Categories)
|
||||
.Select(c => c.Name)
|
||||
.ToArray();
|
||||
|
||||
public static string[] AllCategoryIds(this Book book)
|
||||
=> book.CategoriesLink?.Any() is not true ? null
|
||||
: book
|
||||
.CategoriesLink
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue