Пример #1
0
        public IActionResult EditPieDetail(int id)
        {
            var pieDetail = _pieDetailRepository.PieDetails.First(x => x.PieDetailId == id);

            if (pieDetail == null)
            {
                return(NotFound());
            }
            else
            {
                var pieDetailCreateViewModel = _mapper.Map <PieDetail, PieDetailCreateViewModel>(pieDetail);
                pieDetailCreateViewModel.Albumes  = _flickrRepository.AlbumsOptions();
                pieDetailCreateViewModel.Children = _pieDetailRepository.GetCatalogChildren(pieDetailCreateViewModel.PieDetailId);
                return(View(pieDetailCreateViewModel));
            }
        }
Пример #2
0
 public IEnumerable <Product> GetByParentForCatalog(int id) => _pieDetailRepository.GetCatalogChildren(id);