❔ Transform ASP.NET Core IdentityUser into a two-keys table
I need to modify the IdentityUser class so that it has two keys, id and companyId.
I tried to extend the IdentityUser class like this
but, when I try to generate the migration data, I have the following error
Of course, since IdentityUser is a type from Microsoft, I don't think it's a good idea to change it.
How should I do?
Thanks
IdentityUser Class (Microsoft.AspNetCore.Identity.EntityFrameworkCore)
The default implementation of IdentityUser which uses a string as a primary key.
4 Replies
Try the fluent config?
first time I heard of it, I'll take a look, thanks!
In general, prefer fluent config over attributes
And prefer convention over fluent config
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.