static public ArchiveStudyStorage Load(IPersistenceContext read, ServerEntityKey key) { var broker = read.GetBroker <IArchiveStudyStorageEntityBroker>(); ArchiveStudyStorage theObject = broker.Load(key); return(theObject); }
static public ArchiveStudyStorage Insert(ArchiveStudyStorage entity) { using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush)) { ArchiveStudyStorage newEntity = Insert(update, entity); update.Commit(); return(newEntity); } }
static public ArchiveStudyStorage Insert(IUpdateContext update, ArchiveStudyStorage entity) { var broker = update.GetBroker <IArchiveStudyStorageEntityBroker>(); var updateColumns = new ArchiveStudyStorageUpdateColumns(); updateColumns.PartitionArchiveKey = entity.PartitionArchiveKey; updateColumns.StudyStorageKey = entity.StudyStorageKey; updateColumns.ServerTransferSyntaxKey = entity.ServerTransferSyntaxKey; updateColumns.ArchiveTime = entity.ArchiveTime; updateColumns.ArchiveXml = entity.ArchiveXml; ArchiveStudyStorage newEntity = broker.Insert(updateColumns); return(newEntity); }