Exemplo n.º 1
0
 public static IDataLoader <int, IEnumerable <TReturn> > GetDataLoader <TSource, TReturn>(
     this ResolveFieldContext <TSource> context, Func <IEnumerable <int>, Task <ILookup <int, TReturn> > > fetchDelegate)
 {
     return(context.GetLoadContext().GetOrCreateLoader(context.FieldDefinition, fetchDelegate));
 }
Exemplo n.º 2
0
 public static IDataLoader <TReturn> GetDataLoader <TSource, TReturn>(
     this ResolveFieldContext <TSource> context, Func <Task <TReturn> > fetchDelegate)
 {
     return(context.GetLoadContext().GetOrCreateLoader(context.FieldDefinition, fetchDelegate));
 }