Exemplo n.º 1
0
        public List <IOriginProfileModel> Search(IOriginProfileSearchModel searchModel, bool asListing = false)
        {
            var results = OriginProfilesRepository.Search(searchModel);

            return(asListing
                ? results.Select(OriginProfileMapper.MapToModelListing).ToList()
                : results.Select(OriginProfileMapper.MapToModelLite).ToList());
        }
Exemplo n.º 2
0
 // ReSharper disable once ReturnTypeCanBeEnumerable.Local
 // ReSharper disable once SuggestBaseTypeForParameter
 private IQueryable <IOriginProfile> SearchCommon(IOriginProfileSearchModel searchModel, bool requireActive)
 {
     return(Context.OriginProfiles
            .FilterByBaseFilters(searchModel, requireActive)
            .FilterByPaging(searchModel.Paging));
 }
Exemplo n.º 3
0
 public IEnumerable <IOriginProfile> Search(IOriginProfileSearchModel searchModel, bool requireActive = true)
 {
     return(SearchCommon(searchModel, requireActive));
 }
Exemplo n.º 4
0
 public IEnumerable <dynamic> Search(IOriginProfileSearchModel searchModel, System.Func <IOriginProfile, dynamic> selectStatement, bool requireActive = true)
 {
     return(SearchCommon(searchModel, requireActive)
            .Select(selectStatement));
 }
 // ReSharper disable once ReturnTypeCanBeEnumerable.Local
 // ReSharper disable once SuggestBaseTypeForParameter
 private IQueryable<IOriginProfile> SearchCommon(IOriginProfileSearchModel searchModel, bool requireActive)
 {
     return Context.OriginProfiles
         .FilterByBaseFilters(searchModel, requireActive)
         .FilterByPaging(searchModel.Paging);
 }
 public IEnumerable<IOriginProfile> Search(IOriginProfileSearchModel searchModel, bool requireActive = true)
 {
     return SearchCommon(searchModel, requireActive);
 }
 public IEnumerable<dynamic> Search(IOriginProfileSearchModel searchModel, System.Func<IOriginProfile, dynamic> selectStatement, bool requireActive = true)
 {
     return SearchCommon(searchModel, requireActive)
         .Select(selectStatement);
 }
 public List<IOriginProfileModel> Search(IOriginProfileSearchModel searchModel, bool asListing = false)
 {
     var results = OriginProfilesRepository.Search(searchModel);
     return asListing
         ? results.Select(OriginProfileMapper.MapToModelListing).ToList()
         : results.Select(OriginProfileMapper.MapToModelLite).ToList();
 }