I have a many to many EF map similar to the example below. I am using EF code first approach so my mapping class inherits EntityTypeConfiguration<>.
this.HasMany(a => a.KPIs)
.WithMany()
.Map(a =>
{
a.ToTable("KeyResultArea_KeyPerformanceIndicator_Mapping");
a.MapLeftKey("KRA_Id");
a.MapRightKey("KPI_Id");
});
As a result of this im left with the schema shown below.
No great surprises so far. - However I would like to be able to soft delete one of these mappings so my desired schema would look something like this;
dbo.KeyResultArea_KeyPerformanceIndicator_Mapping(
KRA_Id int,
KPI_Id int,
Deleted bit)
Hope it makes sense, any pointers would be most welcome.