From 4abed0e1bcceb25502e5a38fce3c9e241fd12d3c Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 15 Oct 2025 18:23:43 +0200 Subject: [PATCH] =?UTF-8?q?fix(data):=20define=20navigation=20property=20f?= =?UTF-8?q?or=20Envelope=E2=80=93Document=20relationship?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Explicitly specify the navigation property `d.Envelope` in the relationship between Envelope and Document to ensure proper entity mapping and navigation in EF Core. --- EnvelopeGenerator.Infrastructure/EGDbContext.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EnvelopeGenerator.Infrastructure/EGDbContext.cs b/EnvelopeGenerator.Infrastructure/EGDbContext.cs index cba66f9f..468aaa4c 100644 --- a/EnvelopeGenerator.Infrastructure/EGDbContext.cs +++ b/EnvelopeGenerator.Infrastructure/EGDbContext.cs @@ -125,7 +125,7 @@ public abstract class EGDbContextBase : DbContext modelBuilder.Entity() .HasMany(e => e.Documents) - .WithOne() + .WithOne(d => d.Envelope) .HasForeignKey(ed => ed.EnvelopeId); modelBuilder.Entity()