static public WorkQueueTypeProperties Load(IPersistenceContext read, ServerEntityKey key)
        {
            var broker = read.GetBroker <IWorkQueueTypePropertiesEntityBroker>();
            WorkQueueTypeProperties theObject = broker.Load(key);

            return(theObject);
        }
 static public WorkQueueTypeProperties Insert(WorkQueueTypeProperties entity)
 {
     using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush))
     {
         WorkQueueTypeProperties newEntity = Insert(update, entity);
         update.Commit();
         return(newEntity);
     }
 }
        static public WorkQueueTypeProperties Insert(IUpdateContext update, WorkQueueTypeProperties entity)
        {
            var broker        = update.GetBroker <IWorkQueueTypePropertiesEntityBroker>();
            var updateColumns = new WorkQueueTypePropertiesUpdateColumns();

            updateColumns.WorkQueueTypeEnum     = entity.WorkQueueTypeEnum;
            updateColumns.WorkQueuePriorityEnum = entity.WorkQueuePriorityEnum;
            updateColumns.MemoryLimited         = entity.MemoryLimited;
            updateColumns.AlertFailedWorkQueue  = entity.AlertFailedWorkQueue;
            updateColumns.MaxFailureCount       = entity.MaxFailureCount;
            updateColumns.ProcessDelaySeconds   = entity.ProcessDelaySeconds;
            updateColumns.FailureDelaySeconds   = entity.FailureDelaySeconds;
            updateColumns.DeleteDelaySeconds    = entity.DeleteDelaySeconds;
            updateColumns.PostponeDelaySeconds  = entity.PostponeDelaySeconds;
            updateColumns.ExpireDelaySeconds    = entity.ExpireDelaySeconds;
            updateColumns.MaxBatchSize          = entity.MaxBatchSize;
            updateColumns.ReadLock             = entity.ReadLock;
            updateColumns.WriteLock            = entity.WriteLock;
            updateColumns.QueueStudyStateEnum  = entity.QueueStudyStateEnum;
            updateColumns.QueueStudyStateOrder = entity.QueueStudyStateOrder;
            WorkQueueTypeProperties newEntity = broker.Insert(updateColumns);

            return(newEntity);
        }