Browse Source

Update nav query

SqlSugar5
sunkaixuan 2 years ago
parent
commit
77424647eb
  1. 3
      Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs

3
Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/NavigatManager.cs

@ -215,7 +215,8 @@ namespace SqlSugar
FieldValue = String.Join(",", ids), FieldValue = String.Join(",", ids),
CSharpTypeName = aColumn.PropertyInfo.PropertyType.Name CSharpTypeName = aColumn.PropertyInfo.PropertyType.Name
})); }));
var abids = this.Context.Queryable<object>().AS(mappingEntity.DbTableName).Where(conditionalModels).Select<SugarAbMapping>($"{aColumn.DbColumnName} as aid,{bColumn.DbColumnName} as bid").ToList(); var queryable = this.Context.Queryable<object>();
var abids = queryable.AS(mappingEntity.DbTableName).Where(conditionalModels).Select<SugarAbMapping>($"{queryable.SqlBuilder.GetTranslationColumnName(aColumn.DbColumnName)} as aid,{queryable.SqlBuilder.GetTranslationColumnName(bColumn.DbColumnName)} as bid").ToList();
List<IConditionalModel> conditionalModels2 = new List<IConditionalModel>(); List<IConditionalModel> conditionalModels2 = new List<IConditionalModel>();
conditionalModels2.Add((new ConditionalModel() conditionalModels2.Add((new ConditionalModel()

Loading…
Cancel
Save