This commit is contained in:
2881099
2022-06-11 12:17:40 +08:00
128 changed files with 1370 additions and 600 deletions

View File

@ -34,7 +34,7 @@ public static class FreeSqlMySqlConnectorGlobalExtensions
public static void ExecuteMySqlBulkCopy<T>(this IInsert<T> that, int? bulkCopyTimeout = null) where T : class
{
var insert = that as FreeSql.MySql.Curd.MySqlInsert<T>;
if (insert == null) throw new Exception("ExecuteMySqlBulkCopy 是 FreeSql.Provider.MySqlConnector 特有的功能");
if (insert == null) throw new Exception(CoreStrings.S_Features_Unique("ExecuteMySqlBulkCopy", "MySqlConnector"));
var dt = that.ToDataTable();
if (dt.Rows.Count == 0) return;
@ -83,7 +83,7 @@ public static class FreeSqlMySqlConnectorGlobalExtensions
}
else
{
throw new NotImplementedException("ExecuteMySqlBulkCopy 未实现错误,请反馈给作者");
throw new NotImplementedException($"ExecuteMySqlBulkCopy {CoreStrings.S_Not_Implemented_FeedBack}");
}
}
finally
@ -96,7 +96,7 @@ public static class FreeSqlMySqlConnectorGlobalExtensions
async public static Task ExecuteMySqlBulkCopyAsync<T>(this IInsert<T> that, int? bulkCopyTimeout = null, CancellationToken cancellationToken = default) where T : class
{
var insert = that as FreeSql.MySql.Curd.MySqlInsert<T>;
if (insert == null) throw new Exception("ExecuteMySqlBulkCopyAsync 是 FreeSql.Provider.MySqlConnector 特有的功能");
if (insert == null) throw new Exception(CoreStrings.S_Features_Unique("ExecuteMySqlBulkCopyAsync", "MySqlConnector"));
var dt = that.ToDataTable();
if (dt.Rows.Count == 0) return;
@ -145,7 +145,7 @@ public static class FreeSqlMySqlConnectorGlobalExtensions
}
else
{
throw new NotImplementedException("ExecuteMySqlBulkCopyAsync 未实现错误,请反馈给作者");
throw new NotImplementedException($"ExecuteMySqlBulkCopyAsync {CoreStrings.S_Not_Implemented_FeedBack}");
}
}
finally