// ReSharper disable once ReturnTypeCanBeEnumerable.Local
 // ReSharper disable once SuggestBaseTypeForParameter
 private IQueryable <IVideo> SearchCommon(IVideoSearchModel searchModel, bool requireActive)
 {
     return(Context.Videos
            .FilterByBaseFilters(searchModel, requireActive)
            .FilterByNameableBaseFilters(searchModel)
            .FilterByPaging(searchModel.Paging));
 }
Esempio n. 2
0
        public List <IVideoModel> Search(IVideoSearchModel searchModel, bool asListing = false)
        {
            var results = VideosRepository.Search(searchModel);

            return(asListing
                ? results.Select(VideoMapper.MapToModelListing).ToList()
                : results.Select(VideoMapper.MapToModelLite).ToList());
        }
 public IEnumerable <IVideo> Search(IVideoSearchModel searchModel, bool requireActive = true)
 {
     return(SearchCommon(searchModel, requireActive));
 }
 public IEnumerable <dynamic> Search(IVideoSearchModel searchModel, System.Func <IVideo, dynamic> selectStatement, bool requireActive = true)
 {
     return(SearchCommon(searchModel, requireActive)
            .Select(selectStatement));
 }
 public List<IVideoModel> Search(IVideoSearchModel searchModel, bool asListing = false)
 {
     var results = VideosRepository.Search(searchModel);
     return asListing
         ? results.Select(VideoMapper.MapToModelListing).ToList()
         : results.Select(VideoMapper.MapToModelLite).ToList();
 }
 // ReSharper disable once ReturnTypeCanBeEnumerable.Local
 // ReSharper disable once SuggestBaseTypeForParameter
 private IQueryable<IVideo> SearchCommon(IVideoSearchModel searchModel, bool requireActive)
 {
     return Context.Videos
         .FilterByBaseFilters(searchModel, requireActive)
         .FilterByNameableBaseFilters(searchModel)
         .FilterByPaging(searchModel.Paging);
 }
 public IEnumerable<IVideo> Search(IVideoSearchModel searchModel, bool requireActive = true)
 {
     return SearchCommon(searchModel, requireActive);
 }
 public IEnumerable<dynamic> Search(IVideoSearchModel searchModel, System.Func<IVideo, dynamic> selectStatement, bool requireActive = true)
 {
     return SearchCommon(searchModel, requireActive)
         .Select(selectStatement);
 }