We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basically I have many lists where I need to return ALL authors who wrote Book XYZ.
For example, if Book XYZ has (3) Authors, when I query Book XZY, I need all (3) child authors in the collection to be returned.
From looking at the code, I do not think this feature is included. I wanted to ask to confirm if its included or not. Thanks
label:question
The text was updated successfully, but these errors were encountered:
Try this:
public class Book : AggregateRoot<Guid> { public virtual List<BookAuthor> BookAuthors { get; protected set; } // ctor } public class BookAuthor : Entity<Guid> { public virtual Guid BookId { get; protected set; } public virtual Guid AuthorId { get; protected set; } // ctor }
public class BookDto : EntityDto<Guid> { public List<BookAuthorDto> BookAuthors { get; set; } } public class BookAuthorDto : EntityDto<Guid> { public Guid BookId { get; set; } [RelatedDto] public AuthorDto Author { get; set; } }
var bookDto = ObjectMapper.Map<Book, BookDto>(await _bookRepository.GetAsync(id)); return await _relatedDtoLoader.LoadListAsync(bookDto.BookAuthors);
Sorry, something went wrong.
No branches or pull requests
Basically I have many lists where I need to return ALL authors who wrote Book XYZ.
For example, if Book XYZ has (3) Authors, when I query Book XZY, I need all (3) child authors in the collection to be returned.
From looking at the code, I do not think this feature is included. I wanted to ask to confirm if its included or not. Thanks
label:question
The text was updated successfully, but these errors were encountered: