Esempio n. 1
0
 public static GenericSpecification <TSeachable> Descending <TSeachable, TProperty>(
     this GenericSpecification <TSeachable> specification,
     Expression <Func <TSeachable, TProperty> > expression)
     where TSeachable : class, ISearchable
 {
     return(specification.OrderBy(PropertyName(expression), false));
 }
Esempio n. 2
0
 public static GenericSpecification <TSeachable> NotIn <TSeachable, TProperty>(
     this GenericSpecification <TSeachable> specification,
     Expression <Func <TSeachable, IEnumerable <TProperty> > > expression,
     TProperty value)
     where TSeachable : class, ISearchable
 {
     specification.Match(PropertyName(expression), GenericSearchFilter.ValueNotIn, value);
     return(specification);
 }
Esempio n. 3
0
 public static GenericSpecification <TSeachable> MoreOrEqualThen <TSeachable, TProperty>(
     this GenericSpecification <TSeachable> specification,
     Expression <Func <TSeachable, TProperty> > expression,
     TProperty value)
     where TSeachable : class, ISearchable
 {
     specification.Match(PropertyName(expression), GenericSearchFilter.MoreOrEqualThen, value);
     return(specification);
 }
Esempio n. 4
0
 public static GenericSpecification <TSeachable> Between <TSeachable, TProperty>(
     this GenericSpecification <TSeachable> specification,
     Expression <Func <TSeachable, TProperty> > expression,
     TProperty lower,
     TProperty upper)
     where TSeachable : class, ISearchable
 {
     specification.Match(PropertyName(expression), GenericSearchFilter.MoreOrEqualThen, lower);
     specification.Match(PropertyName(expression), GenericSearchFilter.LessOrEqualThen, upper);
     return(specification);
 }
Esempio n. 5
0
 public static GenericSpecification <TSeachable> NotStartsWith <TSeachable>(
     this GenericSpecification <TSeachable> specification,
     string value,
     Expression <Func <TSeachable, string> > expression,
     bool caseInsensitive = false)
     where TSeachable : class, ISearchable
 {
     specification.Match(
         PropertyName(expression),
         caseInsensitive ? GenericSearchFilter.ValueNotStartsWithCaseInsensitive : GenericSearchFilter.ValueNotStartsWith,
         value);
     return(specification);
 }