Beispiel #1
0
        static public ServerPartitionDataAccess Load(IPersistenceContext read, ServerEntityKey key)
        {
            var broker = read.GetBroker <IServerPartitionDataAccessEntityBroker>();
            ServerPartitionDataAccess theObject = broker.Load(key);

            return(theObject);
        }
Beispiel #2
0
 static public ServerPartitionDataAccess Insert(ServerPartitionDataAccess entity)
 {
     using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush))
     {
         ServerPartitionDataAccess newEntity = Insert(update, entity);
         update.Commit();
         return(newEntity);
     }
 }
Beispiel #3
0
        static public ServerPartitionDataAccess Insert(IUpdateContext update, ServerPartitionDataAccess entity)
        {
            var broker        = update.GetBroker <IServerPartitionDataAccessEntityBroker>();
            var updateColumns = new ServerPartitionDataAccessUpdateColumns();

            updateColumns.ServerPartitionKey = entity.ServerPartitionKey;
            updateColumns.DataAccessGroupKey = entity.DataAccessGroupKey;
            ServerPartitionDataAccess newEntity = broker.Insert(updateColumns);

            return(newEntity);
        }