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.
This commit is contained in:
2025-12-15 13:51:16 +01:00
parent 5404530785
commit 0e0f27c124
2 changed files with 3 additions and 3 deletions

View File

@@ -2,7 +2,7 @@
public record ProfileView
{
public long ProfileGuid { get; init; }
public long Id { get; init; }
public bool Active { get; init; }

View File

@@ -168,9 +168,9 @@ public class RecDbContext(DbContextOptions<RecDbContext> options) : DbContext(op
modelBuilder.Entity<ProfileView>(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");