public static IRepositoryQuery <T> Sort <T>(this IRepositoryQuery <T> query, Expression <Func <T, object> > objectPath, SortOrder?order = null) where T : class
 {
     return(query.AddCollectionOptionValue <IRepositoryQuery <T>, IFieldSort>(SortsKey, new SortField {
         Field = objectPath, Order = order
     }));
 }
 public static IRepositoryQuery Include <T>(this IRepositoryQuery query, Expression <Func <T, object> > objectPath)
 {
     return(query.AddCollectionOptionValue <IRepositoryQuery, Field>(IncludesKey, objectPath));
 }
 public static IRepositoryQuery <T> Exclude <T>(this IRepositoryQuery <T> query, Expression <Func <T, object> > objectPath) where T : class
 {
     return(query.AddCollectionOptionValue <IRepositoryQuery <T>, Field>(ExcludesKey, objectPath));
 }
Example #4
0
 public static IRepositoryQuery <T> FieldEquals <T>(this IRepositoryQuery <T> query, Expression <Func <T, object> > objectPath, object value = null) where T : class
 {
     return(query.AddCollectionOptionValue(FieldConditionsKey, new FieldCondition {
         Field = objectPath, Value = value, Operator = ComparisonOperator.Equals
     }));
 }