예제 #1
0
 public Task <Author> GetAuthor([DataLoader] AuthorDataLoader dataLoader, [Parent] Book book)
 {
     return(dataLoader.LoadAsync(book.AuthorId));
 }
예제 #2
0
 public Task <Author> GetAuthorByIdAsync(
     int id,
     AuthorDataLoader authorDataLoader,
     CancellationToken cancellationToken) =>
 authorDataLoader.LoadAsync(id, cancellationToken);
예제 #3
0
 public Task <Author> GetAuthorAsync(
     Book book,
     AuthorDataLoader authorById,
     CancellationToken cancellationToken) =>
 authorById.LoadAsync(book.AuthorId, cancellationToken);