Ejemplo n.º 1
0
 static public ApplicationLog Insert(ApplicationLog entity)
 {
     using (var update = PersistentStoreRegistry.GetDefaultStore().OpenUpdateContext(UpdateContextSyncMode.Flush))
     {
         ApplicationLog newEntity = Insert(update, entity);
         update.Commit();
         return newEntity;
     }
 }
Ejemplo n.º 2
0
 static public ApplicationLog Insert(IUpdateContext update, ApplicationLog entity)
 {
     var broker = update.GetBroker<IApplicationLogEntityBroker>();
     var updateColumns = new ApplicationLogUpdateColumns();
     updateColumns.Host = entity.Host;
     updateColumns.Timestamp = entity.Timestamp;
     updateColumns.LogLevel = entity.LogLevel;
     updateColumns.Thread = entity.Thread;
     updateColumns.Message = entity.Message;
     updateColumns.Exception = entity.Exception;
     ApplicationLog newEntity = broker.Insert(updateColumns);
     return newEntity;
 }