© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
2 replies
Lx0044

Changing the .Net Identity Table's Relationships

What's up everyone. I am playing around with using Identity in a multitenant environment where a user can have profiles in different tenants. My schema before involving Identity was:

In this schema a user can belong to multiple tenants, and for that tenant they can have multiple profiles.

Tenant

User

TenantUser

TenantUserProfile

Profile

In my mind what Profiles, a user has should be referenced to the join table TenantUser. The default Identity models have the UserRole table referenced to User.

Should I keep it this way and just add a tenant column to their join table UserRole, or is there a way to change the underlying relationships in oncreate? I have seen a lot of examples of changing names and adding columns, but not any about changing relationship keys etc.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

.net identity & new table
C#CC# / help
15mo ago
Identity .NET 8
C#CC# / help
2y ago
.NET 8 SPA Identity
C#CC# / help
2y ago
✅ Configuring .NET 8 Identity
C#CC# / help
2y ago