Beispiel #1
0
 // ReSharper disable once ReturnTypeCanBeEnumerable.Local
 // ReSharper disable once SuggestBaseTypeForParameter
 private IQueryable <IResourceType> SearchCommon(IResourceTypeSearchModel searchModel, bool requireActive)
 {
     return(Context.ResourceTypes
            .FilterByBaseFilters(searchModel, requireActive)
            .FilterByNameableBaseFilters(searchModel)
            .FilterByPaging(searchModel.Paging));
 }
Beispiel #2
0
        public List <IResourceTypeModel> Search(IResourceTypeSearchModel searchModel, bool asListing = false)
        {
            var results = ResourceTypesRepository.Search(searchModel);

            return(asListing
                ? results.Select(ResourceTypeMapper.MapToModelListing).ToList()
                : results.Select(ResourceTypeMapper.MapToModelLite).ToList());
        }
 public List<IResourceTypeModel> Search(IResourceTypeSearchModel searchModel, bool asListing = false)
 {
     var results = ResourceTypesRepository.Search(searchModel);
     return asListing
         ? results.Select(ResourceTypeMapper.MapToModelListing).ToList()
         : results.Select(ResourceTypeMapper.MapToModelLite).ToList();
 }
 // ReSharper disable once ReturnTypeCanBeEnumerable.Local
 // ReSharper disable once SuggestBaseTypeForParameter
 private IQueryable<IResourceType> SearchCommon(IResourceTypeSearchModel searchModel, bool requireActive)
 {
     return Context.ResourceTypes
         .FilterByBaseFilters(searchModel, requireActive)
         .FilterByNameableBaseFilters(searchModel)
         .FilterByPaging(searchModel.Paging);
 }
 public IEnumerable<IResourceType> Search(IResourceTypeSearchModel searchModel, bool requireActive = true)
 {
     return SearchCommon(searchModel, requireActive);
 }
 public IEnumerable<dynamic> Search(IResourceTypeSearchModel searchModel, System.Func<IResourceType, dynamic> selectStatement, bool requireActive = true)
 {
     return SearchCommon(searchModel, requireActive)
         .Select(selectStatement);
 }
Beispiel #7
0
 public IEnumerable <IResourceType> Search(IResourceTypeSearchModel searchModel, bool requireActive = true)
 {
     return(SearchCommon(searchModel, requireActive));
 }
Beispiel #8
0
 public IEnumerable <dynamic> Search(IResourceTypeSearchModel searchModel, System.Func <IResourceType, dynamic> selectStatement, bool requireActive = true)
 {
     return(SearchCommon(searchModel, requireActive)
            .Select(selectStatement));
 }