最佳答案
User.Identity.GetUserId()这样做过,但在这里似乎不起作用。
User.Identity没有GetUserId()方法
我正在使用Microsoft.AspNet.Identity。