Skip to content

Commit

Permalink
The AdoAdapter wasn't always using CreateConnection() to use the _sha…
Browse files Browse the repository at this point in the history
…redConnection if it was available.
  • Loading branch information
robhorvath committed Nov 30, 2011
1 parent 4a8d0ae commit d127a97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Simple.Data.Ado/AdoAdapter.cs
Expand Up @@ -269,7 +269,7 @@ private AdoAdapterRelatedFinder CreateRelatedFinder()
if (query.Clauses.OfType<WithCountClause>().Any()) return RunQueryWithCount(query, out unhandledClauses);

ICommandBuilder[] commandBuilders = GetQueryCommandBuilders(query, out unhandledClauses);
IDbConnection connection = _connectionProvider.CreateConnection();
IDbConnection connection = CreateConnection();
if (ProviderSupportsCompoundStatements || commandBuilders.Length == 1)
{
return
Expand Down Expand Up @@ -413,7 +413,7 @@ private AdoAdapterRelatedFinder CreateRelatedFinder()
commandBuilders.AddRange(GetQueryCommandBuilders(queries[i], i, out unhandledClausesForThisQuery));
unhandledClauses.Add(unhandledClausesForThisQuery);
}
IDbConnection connection = _connectionProvider.CreateConnection();
IDbConnection connection = CreateConnection();
IDbCommand command =
CommandBuilder.CreateCommand(
_providerHelper.GetCustomProvider<IDbParameterFactory>(_schema.SchemaProvider),
Expand Down Expand Up @@ -447,7 +447,7 @@ public override bool IsExpressionFunction(string functionName, params object[] a
<SimpleQueryClauseBase>
unhandledClauses)
{
IDbConnection connection = _connectionProvider.CreateConnection();
IDbConnection connection = CreateConnection();
return new QueryBuilder(this).Build(query, out unhandledClauses)
.GetCommand(connection)
.ToObservable(connection, this);
Expand Down

0 comments on commit d127a97

Please sign in to comment.