/// <summary> /// Gets the most popular car brand statistics. /// </summary> /// <returns></returns> /// <exception cref="System.NotImplementedException"></exception> public CarManufacturerNumberStatistics GetMostPopularCarBrandStatistics(/*int maxDifferentiation*/) { CarManufacturerNumberStatistics carManufacturerNumberStatistics = _statisticsRepository.GetMostPopularCarBrandStatistics(); // Calculate rest functionality //TODO implement maxPieCharts parts number (so that we do now have to many "parting") introduce rest section return(carManufacturerNumberStatistics); }
/// <summary> /// Gets the most popular car brand statistics. /// </summary> /// <returns></returns> /// <exception cref="System.NotImplementedException"></exception> public CarManufacturerNumberStatistics GetMostPopularCarBrandStatistics() { CarManufacturerNumberStatistics carManufacturerNumberStatistics = new CarManufacturerNumberStatistics(); using (DmvEntities db = new DmvEntities()) { carManufacturerNumberStatistics.CarManufacturerNumber = db.MobileDeCar .Where(m => m.IsDeleted == false) .GroupBy(m => m.Maker) .Select(g => new { Name = g.Key, Count = g.Count() }) .ToDictionary(m => m.Name, m => m.Count); } return(carManufacturerNumberStatistics); }
public virtual ActionResult MostPopularCarBrand() { CarManufacturerNumberStatistics carManufacturerNumberStatistics = ServiceLocator.Instance.Resolve <IStatisticsManager>().GetMostPopularCarBrandStatistics(); return(PartialView(MVC.Statistics.Views._MostPopularCarBrand, carManufacturerNumberStatistics)); }