Friday, 15 March 2013

asp.net - ConnectionString object instantiation -



asp.net - ConnectionString object instantiation -

where , when should store , instantiate connectionstring (got web.config) object used in asp.net webapp ui layer, passed passed through business layer , info access layer (all layers different projects/dll).

i know out create it, , access, i'm wondering best practice, global.asax property connectionstring ? instantiated when (application_start, session_start)? session item?

thanks reading, please shout opinion!

let dal read connectionstring ui web.config. presentation layer , business layer not need know database connection string , should not passed through between layers. can initialize in dal or set in constructor. remember open , close connection every method phone call in dal.

asp.net .net

No comments:

Post a Comment