Yes, you are right. However, you have to explicitly declare the TenantGroupMember.UserProfileId
property as foreign key of the relationship. EF won't detect this by convention and would treat it as ordinary scalar property and create another FK column in the database. You can do it with data annotations...
[ForeignKey("UserProfileId")]
public virtual ICollection<TenantGroupMember> TenantGroupMembers { get; set; }
...or with Fluent API:
modelBuilder.Entity<Tenant>()
.HasMany(t => t.TenantGroupMembers)
.WithRequired()
.HasForeignKey(tgm => tgm.UserProfileId);
The relationship will have the Tenant
table in the database as principal/primary key table, not the UserProfile
table.