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:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user