Jak utworzyć indeks na wielu dokumentach z redukcją
Mam następujące dokumenty:
<code> public class User { public string Id { get; set; } public string Email { get; set; } public string Password { get; set; } } public class Book { public string Id { get; set; } public string Title { get; set; } } public class BookFavorite { public string Id { get; set; } public string UserId { get; set; } public string BookId { get; set; } } </code>
Chcę wyświetlić listę książek i uzyskać informacje o każdej książce, jeśli użytkownik ma ją w ulubionych.
Właściwie taki wynik:
<code> public class QueryResult { public Book Book { get; set; } public User User { get; set; } public bool IsInFavorite { get; set; } } </code>
Jak mogę utworzyć mój indeks, aby to zrobić?
Dzięki.