Esempio n. 1
0
        static public NotificationQueue Load(IPersistenceContext read, ServerEntityKey key)
        {
            var broker = read.GetBroker <INotificationQueueEntityBroker>();
            NotificationQueue theObject = broker.Load(key);

            return(theObject);
        }
Esempio n. 2
0
 static public NotificationQueue Insert(NotificationQueue entity)
 {
     using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush))
     {
         NotificationQueue newEntity = Insert(update, entity);
         update.Commit();
         return(newEntity);
     }
 }
Esempio n. 3
0
        static public NotificationQueue Insert(IUpdateContext update, NotificationQueue entity)
        {
            var broker        = update.GetBroker <INotificationQueueEntityBroker>();
            var updateColumns = new NotificationQueueUpdateColumns();

            updateColumns.ExternalRequestQueueKey = entity.ExternalRequestQueueKey;
            updateColumns.RestNotificationUrl     = entity.RestNotificationUrl;
            updateColumns.NotificationXml         = entity.NotificationXml;
            updateColumns.InsertTime  = entity.InsertTime;
            updateColumns.LastTryTime = entity.LastTryTime;
            updateColumns.Failed      = entity.Failed;
            updateColumns.RetryCount  = entity.RetryCount;
            NotificationQueue newEntity = broker.Insert(updateColumns);

            return(newEntity);
        }