Пример #1
0
 //
 // GET: /Photo/
 public ActionResult Home()
 {
     IPhotoRepository repo = new FileBasedPhotoRepository();
     return View(repo.GetImages(System.Web.HttpContext.Current.Server.MapPath("~/photos/")));
 }
Пример #2
0
        public ActionResult Index(string category)
        {
            //show all photos
            //scroll through all of the files  - or

            IPhotoRepository repo = new FileBasedPhotoRepository();
            return View(category.IsEmpty() ? repo.GetImages( System.Web.HttpContext.Current.Server.MapPath("~/photos/") ) : repo.GetImages(System.Web.HttpContext.Current.Server.MapPath("~/photos/"), category));
        }