samedi 23 mai 2015

How you deal with database connection in .NET?

i am interested to know, and find ideas, of how you deal with database connection in a .NET Application/restful api?

So far, since i was time restricted, i created something around a VO/DAO pattern and the DAO is directly getting a database connection from a Singleton Database object.

So, what would be a good approach to make it better? - I was thinking of maybe inject a new opened database connection to every DAO i am instantiating.

What are your thought? How do you deal with database connection? And where you store the connection string(always web.config?)?

Aucun commentaire:

Enregistrer un commentaire