GetPhotosForGallery() public method

public GetPhotosForGallery ( int galleryId ) : IList
galleryId int
return IList
Beispiel #1
0
        public ActionResult View(int id)
        {
            var db = new PhotoGalleryRepository();

            var gallery = db.GetGallery(id);
            if (gallery == null)
                return HttpNotFound();

            var photos = db.GetPhotosForGallery(id);

            ViewBag.Title = "Gallery - " + gallery.Name;
            ViewBag.Name = gallery.Name;
            ViewBag.GalleryId = id;

            return View(photos);
        }