Created
March 13, 2014 18:23
-
-
Save brianium/9533924 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ConnectionFactory : IConnectionFactory | |
{ | |
private static readonly IDictionary Strings = new Dictionary<string,string>(); | |
static ConnectionFactory() | |
{ | |
lock(Strings.SyncRoot) | |
{ | |
Strings.Add("key", "value"); | |
} | |
} | |
public SqlConnection GetConnection(string key) | |
{ | |
//actually create connection | |
} | |
} | |
public interface IConnectionFactory | |
{ | |
IDbConnection GetConnection(string key); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment