diff --git a/Src/Asp.Net/SqlSugar/Realization/MySql/SqlBuilder/MySqlBuilder.cs b/Src/Asp.Net/SqlSugar/Realization/MySql/SqlBuilder/MySqlBuilder.cs index a78025bbf..10828da25 100644 --- a/Src/Asp.Net/SqlSugar/Realization/MySql/SqlBuilder/MySqlBuilder.cs +++ b/Src/Asp.Net/SqlSugar/Realization/MySql/SqlBuilder/MySqlBuilder.cs @@ -9,6 +9,7 @@ namespace SqlSugar public override string GetTranslationTableName(string name) { + if (name.Contains("`")) return name; Check.ArgumentNullException(name, string.Format(ErrorMessage.ObjNotExist, "Table Name")); var context = this.Context; var mappingInfo = context @@ -31,11 +32,14 @@ namespace SqlSugar public override string GetTranslationColumnName(string propertyName) { - return "`" + propertyName + "`"; + if (propertyName.Contains("`")) return propertyName; + else + return "`" + propertyName + "`"; } public override string GetNoTranslationColumnName(string name) { + if (!name.Contains("`")) return name; return name == null ? string.Empty : Regex.Match(name, @"\`(.*?)\`").Groups[1].Value; } } diff --git a/Src/Asp.Net/SqlSugar/SqlSugar.nuspec b/Src/Asp.Net/SqlSugar/SqlSugar.nuspec index 8ab3ff34d..0fcbebd86 100644 --- a/Src/Asp.Net/SqlSugar/SqlSugar.nuspec +++ b/Src/Asp.Net/SqlSugar/SqlSugar.nuspec @@ -2,7 +2,7 @@ sqlSugar - 4.0.5 + 4.0.6 SqlSugar SqlServer ORM sun kaixuan landa