Ejemplo n.º 1
0
 static public PartitionSopClass Insert(PartitionSopClass entity)
 {
     using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush))
     {
         PartitionSopClass newEntity = Insert(update, entity);
         update.Commit();
         return newEntity;
     }
 }
Ejemplo n.º 2
0
 static public PartitionSopClass Insert(IUpdateContext update, PartitionSopClass entity)
 {
     var broker = update.GetBroker<IPartitionSopClassEntityBroker>();
     var updateColumns = new PartitionSopClassUpdateColumns();
     updateColumns.ServerPartitionKey = entity.ServerPartitionKey;
     updateColumns.ServerSopClassKey = entity.ServerSopClassKey;
     updateColumns.Enabled = entity.Enabled;
     PartitionSopClass newEntity = broker.Insert(updateColumns);
     return newEntity;
 }
        static public PartitionSopClass Insert(IUpdateContext update, PartitionSopClass entity)
        {
            var broker        = update.GetBroker <IPartitionSopClassEntityBroker>();
            var updateColumns = new PartitionSopClassUpdateColumns();

            updateColumns.ServerPartitionKey = entity.ServerPartitionKey;
            updateColumns.ServerSopClassKey  = entity.ServerSopClassKey;
            updateColumns.Enabled            = entity.Enabled;
            PartitionSopClass newEntity = broker.Insert(updateColumns);

            return(newEntity);
        }