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

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

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