//[Route("Catalog")] public IActionResult List() { var catalogVM = new List <CatalogViewModel>(); var catalogs = _catalogRepository.GetAll(); if (catalogs.Count() == 0) { return(View("Empty")); } foreach (var catalog in catalogs) { catalogVM.Add(new CatalogViewModel { Catalog = catalog, PipelineCount = _pipelineRepository.Count(x => x.CatalogId == catalog.CatalogId) }); } return(View(catalogVM)); }