Beispiel #1
0
        public IActionResult Edit(int id)
        {
            Cloth cloth = _clothRepository.GetCloth(id);
            ClothEditViewModel employeeEditViewModel = new ClothEditViewModel
            {
                Id                = cloth.Id,
                Title             = cloth.Title,
                Price             = cloth.Price,
                Description       = cloth.Description,
                ExistingPhotoPath = cloth.PhotoPath
            };

            return(View(employeeEditViewModel));
        }
Beispiel #2
0
        public IActionResult Details(int id)
        {
            var cloth = clothRepository.GetCloth(id);

            if (cloth == null)
            {
                return(NotFound());
            }
            return(View(cloth));
        }