阅读背景:

我应该何时打开和关闭与SQL Server的连接

来源:互联网 

I have a simple static class with a few methods in it. Each of those methods open a SqlConnection, query the database and close the connection. This way, I am sure that I always close the connection to the database, but on the other hand, I don't like to always open and close connection. Below is an example of what my methods look like.I have a simple static class with a few methods




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: