From a9f2c4c2f79eb755f8b80cda4cdc1c75ec856686 Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 12 Jan 2026 13:03:56 +0100 Subject: [PATCH] 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. --- src/ReC.Infrastructure/RecDbContext.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ReC.Infrastructure/RecDbContext.cs b/src/ReC.Infrastructure/RecDbContext.cs index 00bb8b5..5464280 100644 --- a/src/ReC.Infrastructure/RecDbContext.cs +++ b/src/ReC.Infrastructure/RecDbContext.cs @@ -289,6 +289,14 @@ public class RecDbContext(DbContextOptions options) : DbContext(op b.Property(e => e.AddedWhen).HasColumnName("ADDED_WHEN"); b.Property(e => e.ChangedWho).HasColumnName("CHANGED_WHO"); 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(b =>