Esempio n. 1
0
        public List <ITeamCharacterEnemyModel> Search(ITeamCharacterEnemySearchModel searchModel, bool asListing = false)
        {
            var results = TeamCharacterEnemiesRepository.Search(searchModel);

            return(asListing
                ? results.Select(TeamCharacterEnemyMapper.MapToModelListing).ToList()
                : results.Select(TeamCharacterEnemyMapper.MapToModelLite).ToList());
        }
 // ReSharper disable once ReturnTypeCanBeEnumerable.Local
 // ReSharper disable once SuggestBaseTypeForParameter
 private IQueryable<ITeamCharacterEnemy> SearchCommon(ITeamCharacterEnemySearchModel searchModel, bool requireActive)
 {
     return Context.TeamCharacterEnemies
         .FilterByBaseFilters(searchModel, requireActive)
         .FilterByPaging(searchModel.Paging);
 }
 public IEnumerable<ITeamCharacterEnemy> Search(ITeamCharacterEnemySearchModel searchModel, bool requireActive = true)
 {
     return SearchCommon(searchModel, requireActive);
 }
 public IEnumerable<dynamic> Search(ITeamCharacterEnemySearchModel searchModel, System.Func<ITeamCharacterEnemy, dynamic> selectStatement, bool requireActive = true)
 {
     return SearchCommon(searchModel, requireActive)
         .Select(selectStatement);
 }
 public List<ITeamCharacterEnemyModel> Search(ITeamCharacterEnemySearchModel searchModel, bool asListing = false)
 {
     var results = TeamCharacterEnemiesRepository.Search(searchModel);
     return asListing
         ? results.Select(TeamCharacterEnemyMapper.MapToModelListing).ToList()
         : results.Select(TeamCharacterEnemyMapper.MapToModelLite).ToList();
 }
 // ReSharper disable once ReturnTypeCanBeEnumerable.Local
 // ReSharper disable once SuggestBaseTypeForParameter
 private IQueryable <ITeamCharacterEnemy> SearchCommon(ITeamCharacterEnemySearchModel searchModel, bool requireActive)
 {
     return(Context.TeamCharacterEnemies
            .FilterByBaseFilters(searchModel, requireActive)
            .FilterByPaging(searchModel.Paging));
 }
 public IEnumerable <ITeamCharacterEnemy> Search(ITeamCharacterEnemySearchModel searchModel, bool requireActive = true)
 {
     return(SearchCommon(searchModel, requireActive));
 }
 public IEnumerable <dynamic> Search(ITeamCharacterEnemySearchModel searchModel, System.Func <ITeamCharacterEnemy, dynamic> selectStatement, bool requireActive = true)
 {
     return(SearchCommon(searchModel, requireActive)
            .Select(selectStatement));
 }