Пример #1
0
        public ActionResult Admin()
        {
            var photos = (from m in homePageService.FetchPhotos()
                          select new HomePagePhotoViewModel
            {
                HomePagePhotoId = m.HomePagePhotoId,
                DisplayOrder = m.DisplayOrder,
                PhotoPath = m.PhotoPath
            }).ToList();


            DeleteOrphanPhotos(photos);
            return(View(photos));
        }