// GET: Photo public ActionResult Index() { PhotoAlbumRepository photoAlbumRepository = new PhotoAlbumRepository(new yslDataContext()); var a = photoAlbumRepository.getPhotoAlbumsWithPhotos().Take(10); ViewBag.photos = a; return View(); }
public ActionResult Photos() { IPhotoAlbumRepository photoAlbumRepository = new PhotoAlbumRepository(new yslDataContext()); List<PhotoAlbumModel> photoAlbumsWithPhotos = photoAlbumRepository.getPhotoAlbumsWithPhotos(); ViewBag.photos = photoAlbumsWithPhotos; return View("Photos", "~/Views/Shared/_LayoutAdmin.cshtml"); }