Refactor Envelope properties; add DefaultDocument property

Refactored property declarations in the Envelope class for improved readability by removing unnecessary line breaks and nullable preprocessor directives. Added a [NotMapped] DefaultDocument property to return the first document in the Documents list, or null if none exist.
This commit is contained in:
2026-03-09 15:09:51 +01:00
parent d1e2840617
commit ead33ab2e7

View File

@@ -154,8 +154,7 @@ namespace EnvelopeGenerator.Domain.Entities
#if nullable #if nullable
? ?
#endif #endif
Type Type { get; set; }
{ get; set; }
#if NETFRAMEWORK #if NETFRAMEWORK
[NotMapped] [NotMapped]
@@ -169,22 +168,26 @@ namespace EnvelopeGenerator.Domain.Entities
#if nullable #if nullable
? ?
#endif #endif
Documents Documents { get; set; }
{ get; set; }
[NotMapped]
public Document
#if nullable
?
#endif
DefaultDocument => Documents?.FirstOrDefault();
public List<History> public List<History>
#if nullable #if nullable
? ?
#endif #endif
Histories Histories { get; set; }
{ get; set; }
public List<EnvelopeReceiver> public List<EnvelopeReceiver>
#if nullable #if nullable
? ?
#endif #endif
EnvelopeReceivers EnvelopeReceivers { get; set; }
{ get; set; }
//#if NETFRAMEWORK //#if NETFRAMEWORK
/// <summary> /// <summary>