Update exp to sql

This commit is contained in:
sunkaixuan
2022-11-05 10:34:22 +08:00
parent 2963955262
commit 8655af4b9b
2 changed files with 8 additions and 0 deletions

View File

@@ -78,6 +78,10 @@ namespace SqlSugar
var selfParameterName = Context.GetTranslationColumnName((argExp as LambdaExpression).Parameters.First().Name) + UtilConstants.Dot;
if (this.Context.JoinIndex == 0)
result = result.Replace(selfParameterName, SubTools.GetSubReplace(this.Context));
if (!string.IsNullOrEmpty(selfParameterName) && this.Context.IsSingle&& this.Context.JoinIndex == 0)
{
this.Context.CurrentShortName = selfParameterName.TrimEnd('.');
}
return result;
}

View File

@@ -62,6 +62,10 @@ namespace SqlSugar
var selfParameterName = Context.GetTranslationColumnName((argExp as LambdaExpression).Parameters.First().Name) + UtilConstants.Dot;
if (this.Context.JoinIndex == 0)
result = result.Replace(selfParameterName, SubTools.GetSubReplace(this.Context));
if (!string.IsNullOrEmpty(selfParameterName) && this.Context.IsSingle && this.Context.JoinIndex == 0)
{
this.Context.CurrentShortName = selfParameterName.TrimEnd('.');
}
return result;
}
}