|
|
@ -17,9 +17,16 @@ namespace SqlSugar |
|
|
|
{ |
|
|
|
public class UtilMethods |
|
|
|
{ |
|
|
|
public static string ToUnderLine(string str) |
|
|
|
public static string ToUnderLine(string str, bool isToUpper = false) |
|
|
|
{ |
|
|
|
return string.Concat(str.Select((x, i) => i > 0 && char.IsUpper(x) ? "_" + x.ToString() : x.ToString())).ToLower(); |
|
|
|
if (isToUpper) |
|
|
|
{ |
|
|
|
return string.Concat(str.Select((x, i) => i > 0 && char.IsUpper(x) ? "_" + x.ToString() : x.ToString())).ToUpper(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
return string.Concat(str.Select((x, i) => i > 0 && char.IsUpper(x) ? "_" + x.ToString() : x.ToString())).ToLower(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
internal static bool IsJsonMember(Expression expression, SqlSugarProvider context) |
|
|
|