コード例 #1
0
 public AuthorType(AuthorRepository authorRepository)
 {
     Name = "Author";
     Field(x => x.Id);
     Field(x => x.Name).Description("Name of the author");
     Field <ListGraphType <BookType> >(
         "books",
         resolve: context => {
         return(authorRepository.BooksFromAuthor(context.Source.Id));
     }
         );
 }