Improve Query
This commit is contained in:
parent
6cb98f99c5
commit
074d647d19
@ -59,6 +59,15 @@ namespace DataLayer
|
|||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
public static IEnumerable<LibraryBook> FindChildren(this IEnumerable<LibraryBook> bookList, LibraryBook parent)
|
public static IEnumerable<LibraryBook> FindChildren(this IEnumerable<LibraryBook> bookList, LibraryBook parent)
|
||||||
=> bookList.Where(lb => lb.Book.SeriesLink?.Any(s => s.Series.AudibleSeriesId == parent.Book.AudibleProductId) == true).ToList();
|
=> bookList
|
||||||
|
.Where(
|
||||||
|
lb =>
|
||||||
|
lb.Book.IsEpisodeChild() &&
|
||||||
|
lb.Book.SeriesLink?
|
||||||
|
.Any(
|
||||||
|
s =>
|
||||||
|
s.Series.AudibleSeriesId == parent.Book.AudibleProductId
|
||||||
|
) == true
|
||||||
|
).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user