mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-26 14:15:50 +08:00
Synchronization code
This commit is contained in:
@@ -44,6 +44,7 @@ namespace SqlSugar
|
||||
{
|
||||
var exp = expression as MethodCallExpression;
|
||||
var argExp = exp.Arguments[0];
|
||||
InitType(exp);
|
||||
var parametres = (argExp as LambdaExpression).Parameters;
|
||||
if ((argExp as LambdaExpression).Body is UnaryExpression)
|
||||
{
|
||||
@@ -64,5 +65,17 @@ namespace SqlSugar
|
||||
result = result.Replace(selfParameterName, SubTools.GetSubReplace(this.Context));
|
||||
return result;
|
||||
}
|
||||
private void InitType(MethodCallExpression exp)
|
||||
{
|
||||
foreach (var arg in (exp.Arguments[0] as LambdaExpression).Parameters)
|
||||
{
|
||||
if (this.Context.InitMappingInfo != null)
|
||||
{
|
||||
this.Context.InitMappingInfo(arg.Type);
|
||||
this.Context.RefreshMapping();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<package >
|
||||
<metadata>
|
||||
<id>SqlSugarCore</id>
|
||||
<version>5.1.3.24</version>
|
||||
<version>5.1.3.25-preview03</version>
|
||||
<authors>sunkaixuan</authors>
|
||||
<owners>果糖大数据科技</owners>
|
||||
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</licenseUrl>
|
||||
|
||||
Reference in New Issue
Block a user