Esempio n. 1
0
 /// <summary>
 /// 获取数据库服务类型
 /// </summary>
 /// <param name="connKey"></param>
 /// <returns></returns>
 private static ServerType GetServerType(string connKey)
 {
     return(string.IsNullOrEmpty(connKey) ? AbstractDbHelper.DefaultConnectionType : AbstractDbHelper.GetConnectionType(connKey));
 }
Esempio n. 2
0
 /// <summary>
 /// 创建数据库实例。
 /// </summary>
 /// <param name="connKey">连接配置名称</param>
 /// <returns></returns>
 public static IDbHelper Create(string connKey)
 {
     return(Create(AbstractDbHelper.GetConnectionType(connKey), AbstractDbHelper.GetConnectionString(connKey)));
 }