I have the following documents:
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; }
}
I want to request a list of books and get information about each book, if the user has it in his favorites.
In fact, this result:
public class QueryResult
{
public Book Book { get; set; }
public User User { get; set; }
public bool IsInFavorite { get; set; }
}
How can I create my index to accomplish this?
Thank.
source
share