示例#1
0
 public override IGraphQlScalarResult <IEnumerable <Interfaces.Episode?> > AppearsIn()
 {
     return(this.Resolve(droid => from appearance in dbContext.Appearances
                         where appearance.CharacterId == droid.Id
                         orderby appearance.EpisodeId
                         select(Interfaces.Episode?) DomainToInterface.ConvertEpisode(appearance.EpisodeId)));
 }
示例#2
0
 public override IGraphQlScalarResult <IEnumerable <Interfaces.Episode?> > AppearsIn()
 {
     // using a Join instead of inline Linq to show how reuse could be done
     return(this.Join(appearancesJoin).Resolve((human, appearances) => appearances.Select(appearance => (Interfaces.Episode?)DomainToInterface.ConvertEpisode(appearance.EpisodeId))));
 }
示例#3
0
 public override IGraphQlScalarResult <Episode?> Episode() =>
 this.Resolve(_ => (Episode?)DomainToInterface.ConvertEpisode(_.Episode));