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

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

            updateColumns.InsertTime           = entity.InsertTime;
            updateColumns.StudyStorageKey      = entity.StudyStorageKey;
            updateColumns.StudyHistoryTypeEnum = entity.StudyHistoryTypeEnum;
            updateColumns.StudyData            = entity.StudyData;
            updateColumns.ChangeDescription    = entity.ChangeDescription;
            updateColumns.DestStudyStorageKey  = entity.DestStudyStorageKey;
            StudyHistory newEntity = broker.Insert(updateColumns);

            return(newEntity);
        }