public TFCBLOB407 MapObjectToEntity(DocumentBlob obj)
        {
            TFCBLOB407 entity = new TFCBLOB407();

            entity = MapRootObjectToEntity(obj, entity);

            return(entity);
        }
        public TFCBLOB407 MapRootObjectToEntity(DocumentBlob obj, TFCBLOB407 entity)
        {
            entity.TXT_BLOB       = obj.Blob;
            entity.DT_REAP_CHECK  = obj.ReapDate;
            entity.ID_BLOB        = obj.BlobId;
            entity.LN_SIZE_UNCOMP = obj.UncompressedFileSize;
            entity.TP_COMPRESSION = obj.CompressionType;

            return(entity);
        }
        public DocumentBlob MapEntityToObject(TFCBLOB407 entity)
        {
            if (entity != null)
            {
                DocumentBlob obj = new DocumentBlob();

                obj.Blob                 = entity.TXT_BLOB;
                obj.BlobId               = entity.ID_BLOB;
                obj.CompressionType      = entity.TP_COMPRESSION;
                obj.ReapDate             = entity.DT_REAP_CHECK;
                obj.UncompressedFileSize = (int)entity.LN_SIZE_UNCOMP;

                return(obj);
            }

            return(null);
        }
 private void CreateDocumentBlob(TFCBLOB407 entity)
 {
     unitOfWork.DocumentBlobRepo.Insert(entity);
     unitOfWork.Save();
 }
 public DocumentBlob GetByEntity(TFCBLOB407 entity)
 {
     return(MapEntityToObject(entity));
 }