Пример #1
0
        // GET: FurnitureInStorages/Edit/5
        public IActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var furnitureInStorage = _furnitureInStorageRepository.Get(id);

            if (furnitureInStorage == null)
            {
                return(NotFound());
            }
            ViewData["CatalogId"] = new SelectList(_furnitureRepository.GetAll(), "CatalogId", "FurnitureNameWithColor", furnitureInStorage.CatalogId);
            ViewData["StorageId"] = new SelectList(_storageRepository.GetStorageWithShop(), "StorageId", "StorageAddress", furnitureInStorage.StorageId);
            return(View(furnitureInStorage));
        }
Пример #2
0
 // GET api/furniture
 public IEnumerable <Furniture> GetAllFurniture(int page = 0)
 {
     return(repo.GetAll().Skip(page * pageSize).Take(pageSize).ToList());
 }