摘要:
Refer to http://stackoverflow.com/questions/814206/getting-db-connection-through-singleton-classYou won't be able to open multiple SqlDataReaders/Commands with the connection at the same time and will run into thread blocking issues if you are trying to share the same connection object with mult 阅读全文
摘要:
Refer to http://blog.163.com/xhy_cy/blog/static/1049762320112305016599/ private readonly string connectionString; // only can be initializable once private static object syncRoot = new Object();//为了解决多线程,而添加的一个附加变量,以避免死锁 public static SConnection Instance{ get{ if (insta... 阅读全文