You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is possible - I tried this a few weeks ago, and just reverted everything back because I got caught in a snag.
I was able to add the attributes to my custom IdentityUser class, and context (fully qualified class names, since I don't see a way to add "using" statements to the generated context/model files)
The snag I ran into was that I couldn't specify the Primary Key for my inherited IdentityUser class in the EFDesign surface. Maybe there's a way to monkeywrench this thing to work in the Fluent API of the custom context partial class?
Would be super cool!
The text was updated successfully, but these errors were encountered:
It's not trivial, unfortunately. The approach I think is best (and I've worked off and on for quite some time now) is to start with a customized designer that pre-creates the necessary classes. There are a ton of things that, because of how the model integrates into Identity, have to be immutable when they would normally be editable -- but only for those classes. The complexity snowballs pretty quickly.
I haven't given up on getting this in, though. It would be a very popular addition. The overriding principles of code safety, simplicity of use and creating a pit of success drive the design, though.
As described here:
https://docs.microsoft.com/en-us/aspnet/core/security/authentication/customize-identity-model
Not sure if this is possible - I tried this a few weeks ago, and just reverted everything back because I got caught in a snag.
I was able to add the attributes to my custom IdentityUser class, and context (fully qualified class names, since I don't see a way to add "using" statements to the generated context/model files)
The snag I ran into was that I couldn't specify the Primary Key for my inherited IdentityUser class in the EFDesign surface. Maybe there's a way to monkeywrench this thing to work in the Fluent API of the custom context partial class?
Would be super cool!
The text was updated successfully, but these errors were encountered: