public IActionResult Index() { var assetModels = _assets.GetAll(); var listingResult = assetModels .Select(result => new AssetIndexListingModel { Id = result.Id, ImageUrl = result.ImageUrl, AuthororDirector = _assets.getAuthororDirector(result.Id), DeweyCallNumber = _assets.GetDeweyIndex(result.Id), Title = result.Title, Type = _assets.GetType(result.Id) }); var model = new AssetIndexModel() { Assets = listingResult }; return(View(model)); }