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:
@@ -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 =>
|
||||||
|
|||||||
Reference in New Issue
Block a user