I have used oracle connection like below.
using (OracleConnection connection = OracleHelper.GetConnection(this.ConnectionStringKey))
{
//some code
}
This connection needs to be closed manually or it gets closed when the function is executed?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Disposewill be called on the connection when the block goes out of scope, so the connection will be closed automatically.That’s the whole point of having
usingstatements.