Skip to content

Commit

Permalink
Dispose SqlCommandBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Hoppe committed Jun 27, 2016
1 parent c9c1342 commit ff5bed1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/NServiceBus.SqlServer/TableBasedQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ public TableBasedQueue(Address address, string schema)

public TableBasedQueue(string tableName, string schema)
{
var sanitizer = new SqlCommandBuilder();

this.tableName = sanitizer.QuoteIdentifier(tableName);
this.schema = sanitizer.QuoteIdentifier(schema);
using (var sanitizer = new SqlCommandBuilder())
{
this.tableName = sanitizer.QuoteIdentifier(tableName);
this.schema = sanitizer.QuoteIdentifier(schema);
}
}

public void Send(TransportMessage message, SendOptions sendOptions, SqlConnection connection, SqlTransaction transaction = null)
Expand Down

0 comments on commit ff5bed1

Please sign in to comment.