Esempio n. 1
0
        public IActionResult Index()
        {
            var assetmodel    = _asset.GetAll();
            var Listingresult = assetmodel
                                .Select(result => new AssetIndexListingModel()
            {
                Id              = result.Id,
                Title           = result.Title,
                ImageUrl        = result.ImageUrl,
                AuthorOrDirctor = _asset.GetDirectorOrAuthor(result.Id),
                DeweyCallNumber = _asset.GetDeweyIndex(result.Id),
                Type            = _asset.GetType(result.Id)
            });
            var model = new AssetIndexModel()
            {
                Assets = Listingresult
            };

            return(View(model));
        }