diff --git a/Src/Asp.Net/SqlSugar/Utilities/UtilMethods.cs b/Src/Asp.Net/SqlSugar/Utilities/UtilMethods.cs index 203af036a..4105e3be8 100644 --- a/Src/Asp.Net/SqlSugar/Utilities/UtilMethods.cs +++ b/Src/Asp.Net/SqlSugar/Utilities/UtilMethods.cs @@ -17,6 +17,13 @@ namespace SqlSugar { public class UtilMethods { + public static string ToUnderLineNew(string str) + { + if(!str.Contains("_")) + return string.Concat(str.Select((x, i) => i > 0 && char.IsUpper(x) ? "_" + x.ToString() : x.ToString())); + else + return str; + } public static string ToUnderLine(string str, bool isToUpper = false) { if (isToUpper)