SyntaxFix
Write A Post
Hire A Developer
Questions
Just in case you are like me and the Id Field of the User Entity is an Int or something else other than a string,
using Microsoft.AspNet.Identity; int userId = User.Identity.GetUserId<int>();
will do the trick