Set Message default via ctor for .NET Framework only
Removed default value assignment from Message property and added a constructor to set the default message only when compiling for .NET Framework, using conditional compilation. This improves cross-platform compatibility.
This commit is contained in:
@@ -14,6 +14,13 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
[Table("TBSIG_ENVELOPE", Schema = "dbo")]
|
||||
public class Envelope
|
||||
{
|
||||
public Envelope()
|
||||
{
|
||||
#if NETFRAMEWORK
|
||||
Message = My.Resources.Envelope.Please_read_and_sign_this_document;
|
||||
#endif
|
||||
}
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -39,7 +46,7 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[Column("MESSAGE", TypeName = "nvarchar(max)")]
|
||||
public string Message { get; set; } = My.Resources.Envelope.Please_read_and_sign_this_document;
|
||||
public string Message { get; set; }
|
||||
|
||||
[Column("EXPIRES_WHEN", TypeName = "datetime")]
|
||||
public DateTime ExpiresWhen { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user