Add Action and Profile relationships to Result entity

Added navigation properties and foreign key relationships from Result to Action (one-to-many) and Profile (many-to-one) entities using ActionId and ProfileId. This enhances entity associations in the data model.
This commit is contained in:
2026-01-12 13:03:56 +01:00
parent 001f4bf2c5
commit a9f2c4c2f7

View File

@@ -289,6 +289,14 @@ public class RecDbContext(DbContextOptions<RecDbContext> options) : DbContext(op
b.Property(e => e.AddedWhen).HasColumnName("ADDED_WHEN"); b.Property(e => e.AddedWhen).HasColumnName("ADDED_WHEN");
b.Property(e => e.ChangedWho).HasColumnName("CHANGED_WHO"); b.Property(e => e.ChangedWho).HasColumnName("CHANGED_WHO");
b.Property(e => e.ChangedWhen).HasColumnName("CHANGED_WHEN"); b.Property(e => e.ChangedWhen).HasColumnName("CHANGED_WHEN");
b.HasOne(r => r.Action)
.WithMany(a => a.Results)
.HasForeignKey(r => r.ActionId);
b.HasOne(r => r.Profile)
.WithMany()
.HasForeignKey(r => r.ProfileId);
}); });
modelBuilder.Entity<HeaderQueryResult>(b => modelBuilder.Entity<HeaderQueryResult>(b =>