Esempio n. 1
0
        public Document Reconstitute()
        {
            switch (DocumentType)
            {
            case DocumentType.OtherDocument:
                return(OtherDocumentDto?.Reconstitute());

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 2
0
 public void Update(Document entity)
 {
     switch (entity)
     {
     case OtherDocument otherDocument:
     {
         if (OtherDocumentDto == null)
         {
             OtherDocumentDto = new OtherDocumentDto();
         }
         OtherDocumentDto.Update(otherDocument);
         return;
     }
         // other inherited documents...
     }
 }