Browse Source

Synchronization code

pull/40/head
sunkaixuan 1 year ago
parent
commit
f14faa2cd4
  1. 2
      Src/Asp.NetCore2/SqlSugar/Infrastructure/StaticConfig.cs
  2. 9
      Src/Asp.NetCore2/SqlSugar/Utilities/DbExtensions.cs

2
Src/Asp.NetCore2/SqlSugar/Infrastructure/StaticConfig.cs

@ -23,5 +23,7 @@ namespace SqlSugar
public static Func<List<SplitTableInfo>> SplitTableGetTablesFunc;
public static bool Check_StringIdentity = true;
public static Func<string,string> Check_FieldFunc;
}
}

9
Src/Asp.NetCore2/SqlSugar/Utilities/DbExtensions.cs

@ -66,7 +66,14 @@ namespace SqlSugar
/// <returns></returns>
public static string ToCheckField(this string value)
{
if (value != null)
//You can override it because the default security level is very high
if (StaticConfig.Check_FieldFunc != null)
{
return StaticConfig.Check_FieldFunc(value);
}
//Default method
else if (value != null)
{
if (value.IsContainsIn(";", "--"))
{

Loading…
Cancel
Save