public IEnumerable <PropertyTypeMixReportEntry> GetPropertyTypeMixReports(IEnumerable <UnitEntry> UnitEntires)
        {
            var propertyTypeMixReport = UnitEntires
                                        .GroupBy(x => PropertyTypeKeyMap.GetPropertyTypeKey(x.Type))
                                        .Select(x => new PropertyTypeMixReportEntry()
            {
                PropertyType = x.Key,
                Count        = x.Count()
            })
                                        .OrderBy(x => x.PropertyType);

            return(propertyTypeMixReport);
        }
Ejemplo n.º 2
0
        public IEnumerable <PricePointByKeyReportEntry> GetInventoryPricePointByTypeReports(IEnumerable <UnitEntry> UnitEntires)
        {
            var groupedByCity = UnitEntires
                                .GroupBy(x => PropertyTypeKeyMap.GetPropertyTypeKey(x.Type))
                                .Select(x => new {
                Type  = x.Key,
                Units = x
            })
                                .OrderBy(x => x.Type);

            return(groupedByCity
                   .Select(x => new PricePointByKeyReportEntry {
                Key = x.Type,
                PricePointReports = GetInventoryPricePointReports(x.Units)
            }));
        }