示例#1
0
        static public ProcedureCode Load(IPersistenceContext read, ServerEntityKey key)
        {
            var           broker    = read.GetBroker <IProcedureCodeEntityBroker>();
            ProcedureCode theObject = broker.Load(key);

            return(theObject);
        }
示例#2
0
 static public ProcedureCode Insert(ProcedureCode entity)
 {
     using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush))
     {
         ProcedureCode newEntity = Insert(update, entity);
         update.Commit();
         return(newEntity);
     }
 }
示例#3
0
        static public ProcedureCode Insert(IUpdateContext update, ProcedureCode entity)
        {
            var broker        = update.GetBroker <IProcedureCodeEntityBroker>();
            var updateColumns = new ProcedureCodeUpdateColumns();

            updateColumns.ServerPartitionKey = entity.ServerPartitionKey;
            updateColumns.Identifier         = entity.Identifier;
            updateColumns.Text         = entity.Text;
            updateColumns.CodingSystem = entity.CodingSystem;
            ProcedureCode newEntity = broker.Insert(updateColumns);

            return(newEntity);
        }