Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1451

Two databases limit one connection to each (no replies)

$
0
0
I have two separate databases that my .Net application needs to connect to (it's a Windows application, not a web app). It needs to be able to connect to both at the same time, so I'm looking for a way to limit the connection to each database to just one connection per database (thus preventing the application from opening a second connection to either of the databases).

I've played with the Singleton pattern, but that doesn't seem to work as i want it due to the nature of it only allows one connection at a time, regardless of how many databases you have. This could work, but I feel it would be more efficient to have one connection per databases, but no duplicate connections to either database.

Suggestions??

Viewing all articles
Browse latest Browse all 1451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>