コード例 #1
0
 private FilmSearchBuilder AddFromDurationFilter(float?durationFrom)
 {
     Filter = PredicateBuilder.And(Filter, film => (durationFrom > 0) ? film.DurationTime > durationFrom : true);
     return(this);
 }
コード例 #2
0
 private FilmSearchBuilder AddToDurationFilter(float?durationTo)
 {
     Filter = PredicateBuilder.And(Filter, film => (durationTo > 0) ? film.DurationTime < durationTo : true);
     return(this);
 }
コード例 #3
0
 private FilmSearchBuilder AddNameFilter(string namePart)
 {
     Filter = PredicateBuilder.And(Filter, film => film.Name.ToLower().StartsWith(namePart.ToLower()));
     return(this);
 }
コード例 #4
0
 private FilmSearchBuilder AddFilmMakerNameFilter(string filmMakerNamePart)
 {
     Filter = PredicateBuilder.And(Filter, film => film.Filmmaker.ToLower().StartsWith(filmMakerNamePart.ToLower()));
     return(this);
 }
コード例 #5
0
 public FilmSearchBuilder(FilmSearchModel searchModel)
 {
     SearchModel = searchModel;
     Filter      = PredicateBuilder.True <Film>();
 }