예제 #1
0
        public Document Reconstitute()
        {
            switch (DocumentType)
            {
            case DocumentType.OtherDocument:
                return(OtherDocumentDto?.Reconstitute());

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
예제 #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...
     }
 }