From b5c9c8da6cf7895cad0cf9fbe0503ef999242be2 Mon Sep 17 00:00:00 2001 From: TekH Date: Fri, 13 Nov 2026 13:00:10 +0100 Subject: [PATCH] Add framework-specific handling for Id property Introduce conditional compilation to differentiate `Id` property behavior between `NET` and `NETFRAMEWORK` environments. For `NET`, the `Id` property is of type `EnvelopeType` with `[Key]` and `[Column("GUID")]` attributes. For `NETFRAMEWORK`, the `Id` property is of type `int` with a default value of `0`, retaining `[Key]`, `[DatabaseGenerated(DatabaseGeneratedOption.Identity)]`, and `[Column("GUID")]` attributes. These changes ensure compatibility and proper configuration across frameworks. --- .../Entities/EnvelopeTypeDefaults.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/EnvelopeGenerator.Domain/Entities/EnvelopeTypeDefaults.cs b/EnvelopeGenerator.Domain/Entities/EnvelopeTypeDefaults.cs index d417b308..1a60c141 100644 --- a/EnvelopeGenerator.Domain/Entities/EnvelopeTypeDefaults.cs +++ b/EnvelopeGenerator.Domain/Entities/EnvelopeTypeDefaults.cs @@ -11,10 +11,18 @@ namespace EnvelopeGenerator.Domain.Entities [Table("TBSIG_ENVELOPE_TYPE", Schema = "dbo")] public class EnvelopeTypeDefaults { +#if NET + + [Key] + [Column("GUID")] + public EnvelopeType Id { get; set; } +#elif NETFRAMEWORK + [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] [Column("GUID")] - public EnvelopeType Id { get; set; } = 0; + public int Id { get; set; } = 0; +#endif [Required] [Column("TITLE", TypeName = "nvarchar(128)")]