public async Task <IActionResult> Edit([Bind("IdLink,AddDate,Description,LikeCount,LinkURL,UpdateDate,WhoAdd")] Link link)
        {
            if (ModelState.IsValid)
            {
                link.UpdateDate = DateTime.Today;
                _context.Update(link);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(link));
        }
        public async Task <IActionResult> ConfirmEmail(string userId, string code)
        {
            if (userId == null || code == null)
            {
                return(RedirectToAction("Index", "Links"));
            }
            var user = await _userManager.FindByIdAsync(userId);

            if (user == null)
            {
                throw new ApplicationException($"Unable to load user with ID '{userId}'.");
            }
            if (user.EmailConfirmed == false)
            {
                user.EmailConfirmed = true;
                _context.Update(user);
                await _context.SaveChangesAsync();

                return(View("ConfirmEmail", "Users"));
            }
            else
            {
                return(View("ConfirmEmailDoneBefore", "Users"));
            }
        }