I'm trying to get the current user id logged in so I can pull details down for this user as well assign details to the user e.g. booking events, seeing events they have booked, etc.
I have been trying to do like this
var USERID = User.Claims.FirstOrDefault(c => c.Type == "Id")
but I get an error when trying to assign to int.
I have my service method within my data project connecting to db then I pass these methods from the service into the controller, if that helps at all.
Any help would be great.