ASP.NET Core 3.1 “'User' does not contain a definition for 'FindFirstValue'”
问题 While trying to implement the answer from here > How to get the current logged in user Id in ASP.NET Core and the user redirected me to here > https://github.com/dotnet/aspnetcore/issues/18348 var UserId = User.FindFirstValue(ClaimTypes.Name); ^ This is not working, and prints the following error 'User' does not contain a definition for 'FindFirstValue' Edit: Adding controller snippet The full snippet of my controller... using System; using System.Collections.Generic; using System.Linq; using