public IActionResult Dislike(int id) { var claimsIdentity = (ClaimsIdentity)this.User.Identity; var claim = claimsIdentity.FindFirst(ClaimTypes.NameIdentifier); if (claim != null) { var userId = claim.Value; _context.Dislike(userId, id); } return(RedirectToAction(nameof(Index), "Home")); }