Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit e75a1ae

Browse files
committed
Merge pull request #212 from jeffgabhart/q/15624464
Overload OrmLiteConnectionFactory.RegisterConnection with conn factory.
2 parents 3ce602e + 612d60a commit e75a1ae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/ServiceStack.OrmLite/OrmLiteConnectionFactory.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,12 @@ public static Dictionary<string, OrmLiteConnectionFactory> NamedConnections
133133

134134
public void RegisterConnection(string connectionKey, string connectionString, IOrmLiteDialectProvider dialectProvider, bool autoDisposeConnection = true)
135135
{
136-
NamedConnections[connectionKey] = new OrmLiteConnectionFactory(connectionString, autoDisposeConnection, dialectProvider, autoDisposeConnection);
136+
RegisterConnection(connectionKey, new OrmLiteConnectionFactory(connectionString, autoDisposeConnection, dialectProvider, autoDisposeConnection));
137+
}
138+
139+
public void RegisterConnection(string connectionKey, OrmLiteConnectionFactory connectionFactory)
140+
{
141+
NamedConnections[connectionKey] = connectionFactory;
137142
}
138143
}
139144

0 commit comments

Comments
 (0)