/// <summary>
 /// 创建数据库连接字符串
 /// </summary>
 /// <param name="cp"></param>
 /// <returns></returns>
 public static IDataAccess Create(ConnectionParameter cp)
 {
     if (string.IsNullOrEmpty(cp.ConnectionString))
     {
         throw new ArgumentNullException("ConnectionString is null or empty!");
     }
     return(new DataAccess(cp.ConnectionString, cp.DataBaseType));
 }
Exemple #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="cp"></param>
 /// <returns></returns>
 private static IDataAccess CreateDataAccess(ConnectionParameter cp)
 {
     return(new DataAccessProxy(DataAccessProxyFactory.Create(cp)));
 }