The using pattern is better, since calling Dispose closes the connection anyway, but as a bonus, the connection is closed, even if something inside the use goes wrong. For example, an exception or just a return that causes program execution to go out of scope. When using, you do not need to explicitly close the connection, which makes the code more readable. Like another template, the connection should be closed as soon as possible. Lack of performance when closing / opening a connection is too common because the connection pool optimizes reuse of the connection for you.
Felice pollano
source share