Esempio n. 1
0
        public EventLogContext(DbContextOptions <EventLogContext> options, IEventLogContextExtensionActions extensionActions) : base(options)
        {
            _extensionActions = extensionActions;

            Database.EnsureCreated();
            _extensionActions.AdditionalInitializationActions(Database);
        }
Esempio n. 2
0
        public EventLogContext(IEventLogContextExtensionActions extensionActions)
        {
            _extensionActions = extensionActions;

            Database.EnsureCreated();
            _extensionActions.AdditionalInitializationActions(Database);
        }
Esempio n. 3
0
        public CommonTestSettings(string configFilePath, IEventLogContextExtensionActions actions)
        {
            DBMSActions = actions;

            IConfiguration Configuration = new ConfigurationBuilder()
                                           .AddJsonFile(configFilePath, optional: true, reloadOnChange: true)
                                           .Build();

            ConnectionString = Configuration.GetConnectionString("EventLogDatabase");
            SettingsLGF      = new EventLogExportSettings(Configuration.GetSection("LGF"));
            SettingsLGD      = new EventLogExportSettings(Configuration.GetSection("LGD"));
        }
Esempio n. 4
0
 public EventLogOnSQLServer(DbContextOptions <EventLogContext> databaseOptions, int portion)
 {
     _databaseActions  = new EventLogSQLServerActions();
     _maxPeriodRowData = DateTime.MinValue;
     _portion          = portion;
     if (databaseOptions == null)
     {
         var optionsBuilder = new DbContextOptionsBuilder <EventLogContext>();
         _databaseActions.OnConfiguring(optionsBuilder);
         _databaseOptions = optionsBuilder.Options;
     }
     else
     {
         _databaseOptions = databaseOptions;
     }
 }
Esempio n. 5
0
 public static EventLogContext Create(DbContextOptions <EventLogContext> options, IEventLogContextExtensionActions extensionActions)
 {
     return(new EventLogContext(options, extensionActions));
 }
Esempio n. 6
0
 public static EventLogContext Create(IEventLogContextExtensionActions extensionActions)
 {
     return(new EventLogContext(extensionActions));
 }