Esempio n. 1
0
 public static IDatabase CreateDataBase(ConnectionStringSettings settings)
 {
     try
     {
         IDatabase database = new OracleDataBase(settings.ConnectionString);
         return(database);
     }
     catch
     {
         throw new Exception("数据库连接字符串错误!");
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 构建数据访问组件
 /// </summary>
 /// <returns></returns>
 public static IDatabase CreateDataBase()
 {
     try
     {
         IDatabase database = new OracleDataBase(DBConnectionString);
         return(database);
     }
     catch (Exception ex)
     {
         throw new Exception("数据库连接字符串错误!");
     }
 }