コード例 #1
0
        public override void UpdateReferences(ReferencesData data)
        {
            using (EventLogContext _context = EventLogContext.Create(_databaseOptions, _databaseActions))
            {
                _context.FillReferencesToSave(_system, data);
                _context.SaveChanges();

                if (_referencesCache == null)
                {
                    _referencesCache = new ReferencesDataCache(_system);
                }
                _referencesCache.FillByDatabaseContext(_context);
            }
        }
コード例 #2
0
 public RowData(InformationSystemsBase system, EventLogReaderAssistant.Models.RowData sourceRow, ReferencesDataCache referencesCache)
 {
     ApplicationId    = referencesCache.GetReferenceDatabaseId <EventLogReaderAssistant.Models.Applications>(sourceRow);
     Comment          = sourceRow.Comment;
     ComputerId       = referencesCache.GetReferenceDatabaseId <EventLogReaderAssistant.Models.Computers>(sourceRow);
     ConnectId        = sourceRow.ConnectId;
     Data             = sourceRow.Data;
     DataPresentation = sourceRow.DataPresentation;
     DataUUID         = sourceRow.DataUuid;
     EventId          = referencesCache.GetReferenceDatabaseId <EventLogReaderAssistant.Models.Events>(sourceRow);
     Id = sourceRow.RowId;
     InformationSystemId = system.Id;
     MetadataId          = referencesCache.GetReferenceDatabaseId <EventLogReaderAssistant.Models.Metadata>(sourceRow);
     Period              = sourceRow.Period;
     PrimaryPortId       = referencesCache.GetReferenceDatabaseId <EventLogReaderAssistant.Models.PrimaryPorts>(sourceRow);
     SecondaryPortId     = referencesCache.GetReferenceDatabaseId <EventLogReaderAssistant.Models.SecondaryPorts>(sourceRow);
     Session             = sourceRow.Session;
     SeverityId          = referencesCache.GetReferenceDatabaseId <EventLogReaderAssistant.Models.Severity>(sourceRow);
     TransactionDate     = sourceRow.TransactionDate;
     TransactionId       = sourceRow.TransactionId;
     TransactionStatusId = referencesCache.GetReferenceDatabaseId <EventLogReaderAssistant.Models.TransactionStatus>(sourceRow);
     UserId              = referencesCache.GetReferenceDatabaseId <EventLogReaderAssistant.Models.Users>(sourceRow);
     WorkServerId        = referencesCache.GetReferenceDatabaseId <EventLogReaderAssistant.Models.WorkServers>(sourceRow);
 }