// ReSharper disable once ReturnTypeCanBeEnumerable.Local
 // ReSharper disable once SuggestBaseTypeForParameter
 private IQueryable <IObjectAlias> SearchCommon(IObjectAliasSearchModel searchModel, bool requireActive)
 {
     return(Context.ObjectAliases
            .FilterByBaseFilters(searchModel, requireActive)
            .FilterByNameableBaseFilters(searchModel)
            .FilterByPaging(searchModel.Paging));
 }
Exemple #2
0
        public List <IObjectAliasModel> Search(IObjectAliasSearchModel searchModel, bool asListing = false)
        {
            var results = ObjectAliasesRepository.Search(searchModel);

            return(asListing
                ? results.Select(ObjectAliasMapper.MapToModelListing).ToList()
                : results.Select(ObjectAliasMapper.MapToModelLite).ToList());
        }
 public IEnumerable <dynamic> Search(IObjectAliasSearchModel searchModel, System.Func <IObjectAlias, dynamic> selectStatement, bool requireActive = true)
 {
     return(SearchCommon(searchModel, requireActive)
            .Select(selectStatement));
 }
 public IEnumerable <IObjectAlias> Search(IObjectAliasSearchModel searchModel, bool requireActive = true)
 {
     return(SearchCommon(searchModel, requireActive));
 }
 public List<IObjectAliasModel> Search(IObjectAliasSearchModel searchModel, bool asListing = false)
 {
     var results = ObjectAliasesRepository.Search(searchModel);
     return asListing
         ? results.Select(ObjectAliasMapper.MapToModelListing).ToList()
         : results.Select(ObjectAliasMapper.MapToModelLite).ToList();
 }