Update Profile.Id type and fix FK mapping in RecAction

Changed the `Id` property in the `Profile` class from `short?` to `long` to support larger values and resolve a type mismatch with the `ProfileId` foreign key in the `RecAction` class.

Removed the `[NotMapped]` attribute from the `Profile` navigation property in `RecAction` as the type mismatch issue has been resolved. Also removed the related TODO comment. These changes improve database schema consistency and integrity.
This commit is contained in:
tekh 2025-12-03 11:18:36 +01:00
parent 23ccd44bd6
commit edfbfd8e6c
2 changed files with 1 additions and 3 deletions

View File

@ -9,7 +9,7 @@ public class Profile
[Key] [Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)] [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")] [Column("GUID")]
public short? Id { get; set; } public long Id { get; set; }
[Column("ACTIVE")] [Column("ACTIVE")]
public bool? Active { get; set; } public bool? Active { get; set; }

View File

@ -13,8 +13,6 @@ public class RecAction
[Column("PROFILE_ID")] [Column("PROFILE_ID")]
public long? ProfileId { get; set; } public long? ProfileId { get; set; }
// TODO: Remove [NotMapped] once ProfileId FK type mismatch is resolved.
[NotMapped]
[ForeignKey("ProfileId")] [ForeignKey("ProfileId")]
public Profile? Profile { get; set; } public Profile? Profile { get; set; }