mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-20 03:49:55 +08:00
Update mysql back up
This commit is contained in:
@@ -583,11 +583,19 @@ namespace SqlSugar
|
||||
db.Ado.Connection.ChangeDatabase(databaseName);
|
||||
}
|
||||
// Load the MySqlBackup assembly
|
||||
Assembly assembly = Assembly.LoadFrom("MySqlBackup.dll");
|
||||
Assembly assembly = Assembly.LoadFrom("MySqlBackupNet.MySqlConnector.dll");
|
||||
|
||||
// Get the MySqlBackup type
|
||||
Type mbType = assembly.GetType("MySqlConnector.MySqlBackup");
|
||||
|
||||
Type mbType = null;
|
||||
try
|
||||
{
|
||||
mbType = assembly.GetType("MySqlConnector.MySqlBackup", false);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Check.ExceptionEasy("Need MySqlBackup.NET.MySqlConnector", "需要安装:MySqlBackup.NET.MySqlConnector");
|
||||
throw ;
|
||||
}
|
||||
// Create an instance of the MySqlBackup class
|
||||
object mb = Activator.CreateInstance(mbType, db.Ado.Connection.CreateCommand());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user