Browse Source

Synchronization code

pull/33/head
sunkaixuan 1 year ago
parent
commit
5acb02fa19
  1. 5
      Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubFirst.cs
  2. 5
      Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubToList.cs

5
Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubFirst.cs

@ -141,10 +141,7 @@ namespace SqlSugar
var newMemExp = (bodyExp as MemberInitExpression);
var parameters = ExpressionTool.GetParameters(exp);
InitType(exp);
if (parameters.Any())
{
this.Context.CurrentShortName = this.Context.GetTranslationColumnName(parameters.FirstOrDefault().Name);
}
SetShortName(exp, null);
Check.ExceptionEasy(newMemExp == null, $"Subquery ToList(exp,true) expression {exp.ToString()} can only be it=>new class(){{Id = it.id}}", $"子查询ToList(exp,true)表达式{exp.ToString()}只能是it=>new class(){{ id=it.Id}}");
var dic = ExpressionTool.GetMemberBindingItemList(newMemExp.Bindings);
var db = this.Context.SugarContext.Context;

5
Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Subquery/Items/SubToList.cs

@ -141,10 +141,7 @@ namespace SqlSugar
var newMemExp = (bodyExp as MemberInitExpression);
var parameters = ExpressionTool.GetParameters(exp);
InitType(exp);
if (parameters.Any())
{
this.Context.CurrentShortName = this.Context.GetTranslationColumnName(parameters.FirstOrDefault().Name);
}
SetShortName(exp, null);
Check.ExceptionEasy(newMemExp == null, $"Subquery ToList(exp,true) expression {exp.ToString()} can only be it=>new class(){{Id = it.id}}", $"子查询ToList(exp,true)表达式{exp.ToString()}只能是it=>new class(){{ id=it.Id}}");
var dic=ExpressionTool.GetMemberBindingItemList(newMemExp.Bindings);
var db = this.Context.SugarContext.Context;

Loading…
Cancel
Save