Esempio n. 1
0
        public async Task <IActionResult> Leiunurk()
        {
            var leiunurkItems = await _leiunurk.GetAllItems();

            var itemsListing = leiunurkItems.Select(result => new LeiunurkIndexListingModel {
                Id          = result.Id,
                Name        = result.Name,
                Description = result.Description,
                Price       = result.Price,
                Images      = result.Images.Select(imgresult => new ItemImages {
                    ImageFileName = imgresult.ImageFileName
                })
            });

            var model = new LeiunurkIndexModel()
            {
                LeiunurkItemsViewList = itemsListing
            };

            return(View(model));
        }
Esempio n. 2
0
 // GET: Admin/Leiunurk
 public async Task <IActionResult> Index()
 {
     return(View(await _leiunurk.GetAllItems()));
 }