Synchronization code

This commit is contained in:
sunkaixuan 2022-11-05 18:43:06 +08:00
parent 87d41bab3b
commit 3a39bf303f
3 changed files with 9 additions and 1 deletions

View File

@ -385,7 +385,7 @@ namespace SqlSugar
}
}
}
totalNumber = count;
totalNumber.Value = count;
}
public async Task<List<T>> SetContextAsync<ParameterT>(Expression<Func<T, object>> thisFiled1, Expression<Func<object>> mappingFiled1,

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;
}
}