/// <summary> /// Validate that the Sql Connection is not null, and connection is open, etc. /// </summary> /// <param name="sqlConnection"></param> public static void AssertSqlConnectionIsValid(this SqlConnection sqlConnection) { sqlConnection.AssertNotNull(nameof(sqlConnection)); if (sqlConnection.State != ConnectionState.Open) { throw new Exception("Sql Connection provided is not yet open."); } }