From 0e0f27c1248b56f7edb8cda3043f447b937598dd Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 15 Dec 2025 13:51:16 +0100 Subject: [PATCH] Rename ProfileGuid to Id in ProfileView and DbContext Renamed the ProfileGuid property to Id in the ProfileView record. Updated all DbContext mappings and primary key definitions to use Id, while maintaining the mapping to the PROFILE_GUID column in the database view. --- src/ReC.Domain/Entities/ProfileView.cs | 2 +- src/ReC.Infrastructure/RecDbContext.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ReC.Domain/Entities/ProfileView.cs b/src/ReC.Domain/Entities/ProfileView.cs index 1bb92b2..936891b 100644 --- a/src/ReC.Domain/Entities/ProfileView.cs +++ b/src/ReC.Domain/Entities/ProfileView.cs @@ -2,7 +2,7 @@ public record ProfileView { - public long ProfileGuid { get; init; } + public long Id { get; init; } public bool Active { get; init; } diff --git a/src/ReC.Infrastructure/RecDbContext.cs b/src/ReC.Infrastructure/RecDbContext.cs index 9c13e9b..6f057b4 100644 --- a/src/ReC.Infrastructure/RecDbContext.cs +++ b/src/ReC.Infrastructure/RecDbContext.cs @@ -168,9 +168,9 @@ public class RecDbContext(DbContextOptions options) : DbContext(op modelBuilder.Entity(b => { b.ToView("VWREC_PROFILE", "dbo"); - b.HasKey(e => e.ProfileGuid); + b.HasKey(e => e.Id); - b.Property(e => e.ProfileGuid).HasColumnName("PROFILE_GUID"); + b.Property(e => e.Id).HasColumnName("PROFILE_GUID"); b.Property(e => e.Active).HasColumnName("ACTIVE"); b.Property(e => e.TypeId).HasColumnName("TYPE_ID"); b.Property(e => e.Type).HasColumnName("TYPE");