0

I am developing an Asp.Net MVC 5 application using Identity and I am accessing the user name via User.Identity.Name.

Normally I use the UserManager.FindById(User.Identity.GetUserId()) method, but using this creates an unnecessary database trip on every Action method.

I need to find a method for accessing other user profile info (email, website, city etc.) without a database trip.

I'd be grateful if anyone can help?

RickL
  • 3,318
  • 10
  • 38
  • 39
kerabanaga
  • 53
  • 1
  • 6
  • You could make your custom principal and use it. see this http://stackoverflow.com/a/10524305/1433093 – Kundan Singh Chouhan Oct 19 '14 at 13:30
  • You could also look at Claims to store the additional information [Using Claims in ASP.NET Identity](http://kevin-junghans.blogspot.com.au/2013/12/using-claims-in-aspnet-identity.html) –  Oct 19 '14 at 21:58

0 Answers0