Exemplo n.º 1
0
        public ActionResult ViewGallery(int?id)
        {
            if (id == null)
            {
                return(RedirectToAction("Index"));
            }

            GalleryViewModel galleryToView = null;

            var galleryID = (int)id;

            galleryToView = EntityModelMapper.EntityToModel(repo.ByID(galleryID));


            if (galleryToView != null)
            {
                return(View(galleryToView));
            }

            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
        public ActionResult Details(Guid id)
        {
            if (id == null)
            {
                return(RedirectToAction("Index"));
            }

            GalleryViewModel galleryToView = null;

            var galleryID = id;

            galleryToView = ModelMapper.EntityToModel(repo.ByID(galleryID));



            if (galleryToView != null)
            {
                return(View(galleryToView));
            }

            return(RedirectToAction("Index"));
        }