/// <summary> /// 测试AdoDirect连接 /// </summary> /// <returns></returns> private static bool TestADOConnection() { // 数据访问层的模块文件 string DalFile = Application.StartupPath + @"\" + DLL_FILE_NAME; bool exists = File.Exists(DalFile); if (false == exists) { throw new CustomException(LOST_DAL_FILE + "\r\n\r\nFile:" + DalFile); } return(exists && SqlConfiguration.TestConnection()); }
public Task <bool> HealthCheck(IWorkContext context) { var sql = new SqlConfiguration(_configuration.SqlConfiguration.ConnectionString); return(Task.FromResult(sql.TestConnection(context))); }