Open kamazheng opened 5 months ago
In some cases we don't correctly find the related navigations on the join type, so you'd need to configure them explicitly:
modelBuilder.Entity<LaborResourceGroup>()
.HasMany(e => e.LaborResources)
.WithMany(e => e.LaborResourceGroups)
.UsingEntity<LaborVsGroup>(
jb => jb.HasOne(j => j.LaborResource).WithMany(),
jb => jb.HasOne(j => j.LaborResourceGroup).WithMany());
Generate Migration:
Why column & FK LaborResourceGroupsId created?
If I updated the join table to remove the virtual Navigation property, it works. So strange.
EF Version: 8.0.4