title: Detect a DB Connection error using Linq?
body: <p>Is it possible to detect an error in a connection before we get an application "Transport-level error"  using Linq?</p>
  
  <p>Lets say that I have a SQL server called SQLServer1, and I am running an application that connects to that server using LinQ to get some information.</p>
  
  <p>I decide to change the server Name to SQLServer2.
  The next time my application run I will get an error like this:</p>
  
  <p>"<em>A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)</em>"</p>
  
  <p>Because LinQ doens't know that there was a change!</p>
  
  <p>How can I catch this during runtime?
  Is it possible to extend the DataContext class to check somehow the connection before getting the data?</p>
  
  <p>Thanks!</p>