From 42585e1f2c2089f9ef050886691733ce332de83b Mon Sep 17 00:00:00 2001 From: TekH Date: Thu, 29 Oct 2026 15:51:19 +0100 Subject: [PATCH] Make User property conditionally nullable Modified the User property in Envelope.cs to be conditionally nullable using the nullable preprocessor directive. This change allows the property to be nullable when the nullable directive is defined, enhancing flexibility and compatibility with different C# versions and project configurations. --- EnvelopeGenerator.Domain/Entities/Envelope.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/EnvelopeGenerator.Domain/Entities/Envelope.cs b/EnvelopeGenerator.Domain/Entities/Envelope.cs index 1e2f7980..43c53390 100644 --- a/EnvelopeGenerator.Domain/Entities/Envelope.cs +++ b/EnvelopeGenerator.Domain/Entities/Envelope.cs @@ -129,7 +129,11 @@ namespace EnvelopeGenerator.Domain.Entities public int? ExpiresWarningWhenDays { get; set; } [ForeignKey("UserId")] - public User User { get; set; } + public User +#if nullable + ? +#endif + User { get; set; } [Column("TFA_ENABLED")] public bool? TfaEnabled { get; set; }