c# - How and when to deal with database that is down? -


my problem have deal somehow cases when database down in mvc application. so, should try{} catch{} open connection in every controller? or best practice?

note: sample database access isolated in few "manager" classes work repository kind of way.

why opening connection in every controller. should isolated within it's own reusable class.

you may want check out repository pattern implement data access.


Comments

Popular posts from this blog

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -

asp.net - call stack missing info on mono with apache and mod_mono -