mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 20:43:46 +08:00
Specify the mysql csv path
This commit is contained in:
@@ -36,5 +36,6 @@ namespace SqlSugar
|
|||||||
public static object DynamicExpressionParsingConfig;
|
public static object DynamicExpressionParsingConfig;
|
||||||
public static Action<ICacheService, string> CacheRemoveByLikeStringFunc { get; set; }
|
public static Action<ICacheService, string> CacheRemoveByLikeStringFunc { get; set; }
|
||||||
public static Guid TableQuerySqlKey { get; set; }
|
public static Guid TableQuerySqlKey { get; set; }
|
||||||
|
public static string BulkCopy_MySqlCsvPath { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,14 @@ namespace SqlSugar
|
|||||||
return await MySqlConnectorBulkCopy(dt);
|
return await MySqlConnectorBulkCopy(dt);
|
||||||
}
|
}
|
||||||
var dllPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "bulkcopyfiles");
|
var dllPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "bulkcopyfiles");
|
||||||
|
if (StaticConfig.BulkCopy_MySqlCsvPath.HasValue())
|
||||||
|
{
|
||||||
|
if (!FileHelper.IsExistDirectory(StaticConfig.BulkCopy_MySqlCsvPath))
|
||||||
|
{
|
||||||
|
FileHelper.CreateDirectory(StaticConfig.BulkCopy_MySqlCsvPath);
|
||||||
|
dllPath = StaticConfig.BulkCopy_MySqlCsvPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
DirectoryInfo dir = new DirectoryInfo(dllPath);
|
DirectoryInfo dir = new DirectoryInfo(dllPath);
|
||||||
if (!dir.Exists)
|
if (!dir.Exists)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user