Example #1
0
 public static TTo SingleObject <TFrom, TTo>(IQueryable <TFrom> query, ResolveFieldContext <object> context)
 {
     return(QueryToQueryable
            .Resolve <TFrom, TTo>(query, context.SubFields.Values)
            .SingleOrDefault());
 }
Example #2
0
 public static IList <TTo> List <TFrom, TTo>(IQueryable <TFrom> query, ResolveFieldContext <object> context)
 {
     return(QueryToQueryable
            .Resolve <TFrom, TTo>(query, context.SubFields.Values)
            .ToList());
 }