Add one-to-many Action-Results relationship mapping
Added entity configuration to define a one-to-many relationship between Actions and Results. Each Action can have multiple Results, and each Result references its parent Action via the ActionId foreign key.
This commit is contained in:
@@ -262,6 +262,10 @@ public class RecDbContext(DbContextOptions<RecDbContext> options) : DbContext(op
|
||||
b.Property(e => e.PostprocessingQuery).HasColumnName("POSTPROCESSING_QUERY");
|
||||
b.Property(e => e.ErrorAction).HasColumnName("ERROR_ACTION_ID");
|
||||
b.Property(e => e.ErrorActionName).HasColumnName("ERROR_ACTION");
|
||||
|
||||
b.HasMany(e => e.Results)
|
||||
.WithOne(r => r.Action)
|
||||
.HasForeignKey(r => r.ActionId);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<ResultView>(b =>
|
||||
|
||||
Reference in New Issue
Block a user