Browse Source

Subquery BUG

pull/12/MERGE
sunkaixuan 7 years ago
parent
commit
14645b1e1b
  1. 6
      Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubSelect.cs

6
Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubSelect.cs

@ -38,6 +38,12 @@ namespace SqlSugar
public string GetValue(Expression expression = null)
{
var exp = expression as MethodCallExpression;
var entityType = (exp.Arguments[0] as LambdaExpression).Parameters[0].Type;
if (this.Context.InitMappingInfo != null)
{
this.Context.InitMappingInfo(entityType);
this.Context.RefreshMapping();
}
return SubTools.GetMethodValue(this.Context, exp.Arguments[0],ResolveExpressType.FieldSingle);
}
}

Loading…
Cancel
Save