Browse Source

Update exp to sql

pull/12/head
sunkaixuna 3 years ago
parent
commit
2eb91382ed
  1. 2
      Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubInnerJoin.cs
  2. 2
      Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubLeftJoin.cs

2
Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubInnerJoin.cs

@ -44,7 +44,7 @@ namespace SqlSugar
var exp = expression as MethodCallExpression;
var argExp = exp.Arguments[0];
var name =this.Context.GetTranslationColumnName((argExp as LambdaExpression).Parameters[0].Name);
var parameter = (argExp as LambdaExpression).Parameters[1];
var parameter = (argExp as LambdaExpression).Parameters.Last();
Context.InitMappingInfo(parameter.Type);
var tableName= Context.GetTranslationTableName(parameter.Type.Name, true);
var joinString =string.Format(" {2} INNER JOIN {1} {0} ",

2
Src/Asp.Net/SqlSugar/ExpressionsToSql/Subquery/Items/SubLeftJoin.cs

@ -44,7 +44,7 @@ namespace SqlSugar
var exp = expression as MethodCallExpression;
var argExp = exp.Arguments[0];
var name =this.Context.GetTranslationColumnName((argExp as LambdaExpression).Parameters[0].Name);
var parameter = (argExp as LambdaExpression).Parameters[1];
var parameter = (argExp as LambdaExpression).Parameters.Last();
Context.InitMappingInfo(parameter.Type);
var tableName= Context.GetTranslationTableName(parameter.Type.Name, true);
var joinString =string.Format(" {2} LEFT JOIN {1} {0} ",

Loading…
Cancel
Save