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:
@@ -2,7 +2,7 @@
|
||||
|
||||
public record ProfileView
|
||||
{
|
||||
public long ProfileGuid { get; init; }
|
||||
public long Id { get; init; }
|
||||
|
||||
public bool Active { get; init; }
|
||||
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user