示例#1
0
        public ActionResult ViewAlbum(int?id)
        {
            if (id == null)
            {
                return(RedirectToAction("Index"));
            }

            AlbumVM albumToView = null;

            var albumID = (int)id;

            albumToView = ModelMapper.EntityToModel(repo.ByID(albumID));


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

            return(RedirectToAction("Index"));
        }