Exemplo n.º 1
0
        public ActionResult Details(int?id)
        {
            var gameList = _gameListService.Find(id);

            if (gameList == null)
            {
                return(NotFound());
            }
            return(View(gameList));
        }
Exemplo n.º 2
0
        public ActionResult GameListForm(int?id)
        {
            var userid   = _userService.GetLoggedInUserId();
            var user     = _userService.Find(userid);
            var gamelist = _gameListService.Find(id);
            var IsOwner  = _userService.IsOwner(gamelist?.UserList?.UserId);

            if ((!IsOwner && gamelist != null) || user == null)
            {
                return(NotFound());
            }
            var model = new UserGameListFormViewModel
            {
                AppUser  = user,
                GameList = gamelist
            };

            ViewBag.IsOwner = IsOwner;
            return(View(model));
        }