/// <summary> /// /// </summary> /// <param name="connectionString"></param> /// <param name="applicationName"></param> /// <param name="filter"></param> public SqlLoggedSqlConnectionFactory( string connectionString, string applicationName, ISqlLoggedSqlCommandFilter filter) { _filter = filter; _sqlLog = new SqlLog.SqlLog(connectionString); _applicationId = _sqlLog.ApplicationStart(applicationName, LocalTime.Default.Now, false); }
public SafeLoggedSqlConnection(SqlLog.SqlLog sqlLog, int applicationId, string userName, string hostName, string connectionString, ISqlLoggedSqlCommandFilter filter, CancellationToken cancellationToken) { var connection = new SqlLoggedSqlConnection.SqlLoggedSqlConnection(sqlLog, applicationId, userName, hostName, connectionString, filter); _cancellationToken = cancellationToken; Initialize(connection, this); }
public SqlLoggedSqlConnection(SqlLog.SqlLog sqlLog, int applicationId, string userName, string hostName, string connectionString, ISqlLoggedSqlCommandFilter filter) { Assert.IsNotNull(sqlLog); _sqlLog = sqlLog; _applicationId = applicationId; UserName = userName; HostName = hostName; Filter = filter; Connection = new SqlConnection(connectionString); }