Ejemplo n.º 1
0
 public SectionType(ISpeakersRepository speakerRepo, ITagsRepository tagsRepo)
 {
     Field(s => s.Id);
     Field(s => s.Name);
     Field(s => s.Description);
     Field(s => s.SlideUrl);
     Field(s => s.RestrictSlide);
     Field(s => s.IsPanel);
     Field(s => s.StartDate);
     Field(s => s.EndDate);
     Field <ListGraphType <SpeakerType>, List <Speaker> >()
     .Name("speakers")
     .ResolveAsync(context => speakerRepo.GetSpeakersBySectionIdAsync(context.Source.Id));
     Field <ListGraphType <TagType>, List <Tag> >()
     .Name("tags")
     .ResolveAsync(context => tagsRepo.GetTagsBySectionIdAsync(context.Source.Id));
 }