public bool TestConnection() { using (var db = new DATAContext()) { DbConnection conn = db.Database.Connection; try { conn.Open(); // check the database connection return(true); } catch { return(false); } } }
public bool TestConnection() { using (var db = new DATAContext()) { DbConnection conn = db.Database.Connection; try { conn.Open(); // check the database connection return(true); } catch { return(false); } } }