Пример #1
0
        private IEnumerable<Property> GetPropertyForAreaAndStatus(List<string> areas, PipelinePosition pipelinePosition, Ordering order, Page page)
        {
            Check.If(areas).IsNotNull();
            Check.If(areas).IsNotEmpty();

            var properties = _propertyRepository.GetPropertiesByAreas(areas, Ordering.Newest).ToList();

            if (properties.IsNull() || properties.IsEmpty())
                return new List<Property>();

            foreach (var property in properties)
            {
                property.PipelinePosition = property.PropertyStatus == Status.Let
                    ? PipelinePosition.Let
                    : PipelinePosition.Available;
            }

            return properties
                .Where(p => p.PipelinePosition == pipelinePosition)
                .Skip(page.StartingIndex())
                .Take(page.PageSize);
        }
Пример #2
0
 public List<PropertySummary> GetPropertySummariesForAreaAndStatus(List<string> areas, PipelinePosition pipelinePosition, Ordering order, Page page)
 {
     return GetPropertyForAreaAndStatus(areas, pipelinePosition, order, page)
         .Select(SearchResultFactory.BuildPropertySummary)
         .ToList();
 }
Пример #3
0
 public List<CaselistEntry> GetPropertyCaselistEntryForAreaAndStatus(List<string> areas, PipelinePosition pipelinePosition, Ordering order, Page page)
 {
     return GetPropertyForAreaAndStatus(areas,pipelinePosition,order,page)
         .Select(CaselistEntryFactory.BuildCaselistEntry)
         .ToList();
 }