Last post Aug 25, 2020 01:35 PM by mgebhard
Aug 20, 2020 12:43 AM|seansage|LINK
I am working on streamlining the number of calls in my application and I want to add related entities to the ApplicationUser on login.
Right now the best I could come up with was to add properties I need to the Claims. but having to call User.FindFirst("Value").Value gets to be a pain.
I have a related entity called CurrentAccount, and then also UserAccountAssociations.
These related entities are in my DBContext, but they aren't in my IdentityDbContext.
I want to be able to access these properties anytime by using User.CurrentAccount.Id or User.CurrentAccount.Name, and so on, in a controller, razor page code behind or the .cshtml itself, anywhere in the application.
Is this possible?
Aug 25, 2020 01:35 PM|mgebhard|LINK
I would use extension methods.