Exemplo n.º 1
0
 public static TTo SingleObject <TFrom, TTo>(IQueryable <TFrom> query, ResolveFieldContext <object> context)
 {
     return(QueryToQueryable
            .Resolve <TFrom, TTo>(query, context.SubFields.Values)
            .SingleOrDefault());
 }
Exemplo n.º 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());
 }