DAAB, do we need to handle connection opening closing manually?

333 views Asked by At

I am using DAAB. Plz guide me do we need to check and clsoe connections manually after a db call ?

thanks

1

There are 1 answers

0
Nicolas De Irisarri On BEST ANSWER

Enterprise library takes care of opening and closing connections for you.

You don't need to write code to do this.

A way of using Entlib 5.0 DAAB (without unity or any other dependency injection) is :

public DataSet someMethod()
{
    database = new SqlDatabase(connectionString);
    return database.ExecuteDataSet("procName", valparam1, valparam2);
}