Exemplo n.º 1
0
 public static void TryMySqlData()
 {
     if (!IsTryMySql)
     {
         try
         {
             MySqlProvider db   = new MySqlProvider();
             var           conn = db.GetAdapter();
             IsTryMySql = true;
         }
         catch
         {
             throw new Exception("You need to refer to MySql.Data.dl");
         }
     }
 }
Exemplo n.º 2
0
 public static void TryMySqlData()
 {
     if (!IsTryMySqlData)
     {
         try
         {
             MySqlProvider db   = new MySqlProvider();
             var           conn = db.GetAdapter();
             IsTryMySqlData = true;
         }
         catch
         {
             var message = ErrorMessage.GetThrowMessage(
                 "You need to refer to MySql.Data.dll",
                 "需要引用MySql.Data.dll,请在Nuget安装最新稳定版本,如果有版本兼容问题请先删除原有引用");
             throw new Exception(message);
         }
     }
 }