static public ServerPartitionDataAccess Load(IPersistenceContext read, ServerEntityKey key) { var broker = read.GetBroker <IServerPartitionDataAccessEntityBroker>(); ServerPartitionDataAccess theObject = broker.Load(key); return(theObject); }
static public ServerPartitionDataAccess Insert(ServerPartitionDataAccess entity) { using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush)) { ServerPartitionDataAccess newEntity = Insert(update, entity); update.Commit(); return(newEntity); } }
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); }