private RoadsIndexViewModel MapCategories() { var model = new RoadsIndexViewModel { AllRoads = MapAllRoads(this.roadsIndexService.GetAllRoads().ToList()), LatestRoads = MapAllRoads(this.roadsIndexService.GetLatestRoads().ToList()), LongestRoads = MapAllRoads(this.roadsIndexService.GetLongestRoads().ToList()), TopRoads = MapAllRoads(this.roadsIndexService.GetTopRoads().ToList()), }; return(model); }
public IActionResult Index() { RoadsIndexViewModel model = MapCategories(); return(View(model)); }