コード例 #1
0
        public List <IEpisodeCharacterModel> Search(IEpisodeCharacterSearchModel searchModel, bool asListing = false)
        {
            var results = EpisodeCharactersRepository.Search(searchModel);

            return(asListing
                ? results.Select(EpisodeCharacterMapper.MapToModelListing).ToList()
                : results.Select(EpisodeCharacterMapper.MapToModelLite).ToList());
        }
 // ReSharper disable once ReturnTypeCanBeEnumerable.Local
 // ReSharper disable once SuggestBaseTypeForParameter
 private IQueryable<IEpisodeCharacter> SearchCommon(IEpisodeCharacterSearchModel searchModel, bool requireActive)
 {
     return Context.EpisodeCharacters
         .FilterByBaseFilters(searchModel, requireActive)
         .FilterByPaging(searchModel.Paging);
 }
 public IEnumerable<IEpisodeCharacter> Search(IEpisodeCharacterSearchModel searchModel, bool requireActive = true)
 {
     return SearchCommon(searchModel, requireActive);
 }
 public IEnumerable<dynamic> Search(IEpisodeCharacterSearchModel searchModel, System.Func<IEpisodeCharacter, dynamic> selectStatement, bool requireActive = true)
 {
     return SearchCommon(searchModel, requireActive)
         .Select(selectStatement);
 }
コード例 #5
0
 // ReSharper disable once ReturnTypeCanBeEnumerable.Local
 // ReSharper disable once SuggestBaseTypeForParameter
 private IQueryable <IEpisodeCharacter> SearchCommon(IEpisodeCharacterSearchModel searchModel, bool requireActive)
 {
     return(Context.EpisodeCharacters
            .FilterByBaseFilters(searchModel, requireActive)
            .FilterByPaging(searchModel.Paging));
 }
コード例 #6
0
 public IEnumerable <IEpisodeCharacter> Search(IEpisodeCharacterSearchModel searchModel, bool requireActive = true)
 {
     return(SearchCommon(searchModel, requireActive));
 }
コード例 #7
0
 public IEnumerable <dynamic> Search(IEpisodeCharacterSearchModel searchModel, System.Func <IEpisodeCharacter, dynamic> selectStatement, bool requireActive = true)
 {
     return(SearchCommon(searchModel, requireActive)
            .Select(selectStatement));
 }