static public PartitionArchive Load(IPersistenceContext read, ServerEntityKey key) { var broker = read.GetBroker <IPartitionArchiveEntityBroker>(); PartitionArchive theObject = broker.Load(key); return(theObject); }
static public PartitionArchive Insert(PartitionArchive entity) { using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush)) { PartitionArchive newEntity = Insert(update, entity); update.Commit(); return(newEntity); } }
static public PartitionArchive Insert(IUpdateContext update, PartitionArchive entity) { var broker = update.GetBroker <IPartitionArchiveEntityBroker>(); var updateColumns = new PartitionArchiveUpdateColumns(); updateColumns.ServerPartitionKey = entity.ServerPartitionKey; updateColumns.ArchiveTypeEnum = entity.ArchiveTypeEnum; updateColumns.Description = entity.Description; updateColumns.Enabled = entity.Enabled; updateColumns.ReadOnly = entity.ReadOnly; updateColumns.ArchiveDelayHours = entity.ArchiveDelayHours; updateColumns.ConfigurationXml = entity.ConfigurationXml; PartitionArchive newEntity = broker.Insert(updateColumns); return(newEntity); }