Пример #1
0
    public async Task <IActionResult> Details(Guid id, CancellationToken token = default)
    {
        if (await _accountRepository.GetAsync(id, token) is Account account)
        {
            var model = new WishlistEditModel
            {
                AccountId   = account.Id,
                DisplayName = account.DisplayName
            };

            if (account.Wishlist.ContainsKey(DateHelper.Year))
            {
                model.Items = account.Wishlist[DateHelper.Year];
            }

            return(View(model));
        }

        return(RedirectToAction("Index", "Home"));
    }
Пример #2
0
        //
        // GET: /Wishlist/Details
        public IActionResult Details(Guid id)
        {
            var model = new WishlistEditModel(id);

            return(View(model));
        }
Пример #3
0
        //
        // GET: /Wishlist/
        public IActionResult Index()
        {
            var model = new WishlistEditModel(User.GetAccount().Id.Value);

            return(View(model));
        }