示例#1
0
        public async Task <IActionResult> OnPostAddToCompareAsync(int productId)
        {
            if (!User.Identity.IsAuthenticated)
            {
                return(RedirectToPage("./Account/Login", new { area = "Identity" }));
            }

            await _productPageService.AddToCompare(User.Identity.Name, productId);

            return(RedirectToPage());
        }