Ejemplo n.º 1
0
        public IActionResult Index()
        {
            var assetModels   = _assets.GetAll();
            var listingResult = assetModels
                                .Select(result => new AssetIndexListingModel
            {
                ID               = result.ID,
                ImgUrl           = result.ImgUrl,
                AuthorOrDirector = _assets.GetAuthoreOrDirector(result.ID),
                CallNumber       = _assets.GetIndex(result.ID),
                Titel            = result.Titel,
                Type             = _assets.GetType(result.ID)
            });
            var model = new AssetIndexModel()
            {
                Assets = listingResult
            };

            return(View(model));
        }