Move InsertObjectResult mapping to Fluent API

Removed [Column] attribute from InsertObjectResult and configured column mapping for NewObjectId in RecDbContext using the Fluent API. This centralizes entity mapping logic in the DbContext.
This commit is contained in:
2026-01-12 14:20:41 +01:00
parent aaa7beb92a
commit e8fa149532
2 changed files with 5 additions and 1 deletions

View File

@@ -4,6 +4,5 @@ namespace ReC.Domain.QueryOutput;
public class InsertObjectResult
{
[Column("oGUID")]
public required long NewObjectId { get; set; }
}

View File

@@ -314,5 +314,10 @@ public class RecDbContext(DbContextOptions<RecDbContext> options) : DbContext(op
b.Property(e => e.RawBody).HasColumnName("REQUEST_BODY");
});
modelBuilder.Entity<InsertObjectResult>(b =>
{
b.HasNoKey();
b.Property(e => e.NewObjectId).HasColumnName("oGUID");
});
}
}