internal DatabaseLogger(string connectionString, Type type) { try { _dbContext = new LoggerContext(connectionString); _windowsEventLogger = new WindowsEventLogger(); } catch { // If anything goes wrong, DatabaseLogger will not throw any exception, just ignore it. } if (type != null) { ClassName = type.FullName; } }
public DatabaseLogger(IDataContext dbContext, IWindowsEventLogger windowsEventLogger) { _dbContext = dbContext; _windowsEventLogger = windowsEventLogger; }