예제 #1
0
        static public Filesystem Load(IPersistenceContext read, ServerEntityKey key)
        {
            var        broker    = read.GetBroker <IFilesystemEntityBroker>();
            Filesystem theObject = broker.Load(key);

            return(theObject);
        }
예제 #2
0
 static public Filesystem Insert(Filesystem entity)
 {
     using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush))
     {
         Filesystem newEntity = Insert(update, entity);
         update.Commit();
         return(newEntity);
     }
 }
예제 #3
0
        static public Filesystem Insert(IUpdateContext update, Filesystem entity)
        {
            var broker        = update.GetBroker <IFilesystemEntityBroker>();
            var updateColumns = new FilesystemUpdateColumns();

            updateColumns.FilesystemPath     = entity.FilesystemPath;
            updateColumns.Enabled            = entity.Enabled;
            updateColumns.ReadOnly           = entity.ReadOnly;
            updateColumns.WriteOnly          = entity.WriteOnly;
            updateColumns.FilesystemTierEnum = entity.FilesystemTierEnum;
            updateColumns.LowWatermark       = entity.LowWatermark;
            updateColumns.HighWatermark      = entity.HighWatermark;
            updateColumns.Description        = entity.Description;
            Filesystem newEntity = broker.Insert(updateColumns);

            return(newEntity);
        }