static public ServiceLock Load(IPersistenceContext read, ServerEntityKey key) { var broker = read.GetBroker <IServiceLockEntityBroker>(); ServiceLock theObject = broker.Load(key); return(theObject); }
static public ServiceLock Insert(ServiceLock entity) { using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush)) { ServiceLock newEntity = Insert(update, entity); update.Commit(); return(newEntity); } }
static public ServiceLock Insert(IUpdateContext update, ServiceLock entity) { var broker = update.GetBroker <IServiceLockEntityBroker>(); var updateColumns = new ServiceLockUpdateColumns(); updateColumns.ServiceLockTypeEnum = entity.ServiceLockTypeEnum; updateColumns.Lock = entity.Lock; updateColumns.ScheduledTime = entity.ScheduledTime; updateColumns.Enabled = entity.Enabled; updateColumns.State = entity.State; updateColumns.FilesystemKey = entity.FilesystemKey; updateColumns.ProcessorId = entity.ProcessorId; ServiceLock newEntity = broker.Insert(updateColumns); return(newEntity); }