using FreeSql; using FreeSql.MySql.Curd; public static partial class FreeSqlMySqlGlobalExtensions { /// /// 特殊处理类似 string.Format 的使用方法,防止注入,以及 IS NULL 转换 /// /// /// /// public static string FormatMySql(this string that, params object[] args) => _mysqlAdo.Addslashes(that, args); static FreeSql.MySql.MySqlAdo _mysqlAdo = new FreeSql.MySql.MySqlAdo(); /// /// MySql 特有的功能,On Duplicate Key Update /// 注意:此功能会开启插入【自增列】 /// /// /// /// public static OnDuplicateKeyUpdate OnDuplicateKeyUpdate(this IInsert that) where T1 : class => new FreeSql.MySql.Curd.OnDuplicateKeyUpdate(that.InsertIdentity()); }