// ReSharper disable once ReturnTypeCanBeEnumerable.Local // ReSharper disable once SuggestBaseTypeForParameter private IQueryable <ILocation> SearchCommon(ILocationSearchModel searchModel, bool requireActive) { return(Context.Locations .FilterByBaseFilters(searchModel, requireActive) .FilterByNameableBaseFilters(searchModel) .FilterByPaging(searchModel.Paging)); }
public List <ILocationModel> Search(ILocationSearchModel searchModel, bool asListing = false) { var results = LocationsRepository.Search(searchModel); return(asListing ? results.Select(LocationMapper.MapToModelListing).ToList() : results.Select(LocationMapper.MapToModelLite).ToList()); }
// ReSharper disable once ReturnTypeCanBeEnumerable.Local // ReSharper disable once SuggestBaseTypeForParameter private IQueryable<ILocation> SearchCommon(ILocationSearchModel searchModel, bool requireActive) { return Context.Locations .FilterByBaseFilters(searchModel, requireActive) .FilterByNameableBaseFilters(searchModel) .FilterByPaging(searchModel.Paging); }
public IEnumerable<ILocation> Search(ILocationSearchModel searchModel, bool requireActive = true) { return SearchCommon(searchModel, requireActive); }
public IEnumerable<dynamic> Search(ILocationSearchModel searchModel, System.Func<ILocation, dynamic> selectStatement, bool requireActive = true) { return SearchCommon(searchModel, requireActive) .Select(selectStatement); }
public List<ILocationModel> Search(ILocationSearchModel searchModel, bool asListing = false) { var results = LocationsRepository.Search(searchModel); return asListing ? results.Select(LocationMapper.MapToModelListing).ToList() : results.Select(LocationMapper.MapToModelLite).ToList(); }
public IEnumerable <ILocation> Search(ILocationSearchModel searchModel, bool requireActive = true) { return(SearchCommon(searchModel, requireActive)); }
public IEnumerable <dynamic> Search(ILocationSearchModel searchModel, System.Func <ILocation, dynamic> selectStatement, bool requireActive = true) { return(SearchCommon(searchModel, requireActive) .Select(selectStatement)); }