Code optimization

This commit is contained in:
skx
2021-01-07 11:29:43 +08:00
parent 5e940ce30b
commit 7194435de0
2 changed files with 2 additions and 2 deletions

View File

@@ -120,7 +120,7 @@ namespace SqlSugar
public static TResult AggregateMax<TResult>(TResult thisValue) { throw new NotSupportedException("Can only be used in expressions"); }
public static int AggregateCount<TResult>(TResult thisValue) { throw new NotSupportedException("Can only be used in expressions"); }
public static int AggregateDistinctCount<TResult>(TResult thisValue) { throw new NotSupportedException("Can only be used in expressions"); }
public static TResult MappingColumn<TResult>(TResult oldColumnName,string newColumnName) { throw new NotSupportedException("Can only be used in expressions"); }
public static TResult MappingColumn<TResult>(TResult type,string newColumnName) { throw new NotSupportedException("Can only be used in expressions"); }
/// <summary>
///Example: new NewT(){name=SqlFunc.GetSelfAndAutoFill(it)} Generated SQL it.*
/// </summary>

View File

@@ -652,7 +652,7 @@ namespace SqlSugar
case "MappingColumn":
var mappingColumnResult = this.Context.DbMehtods.MappingColumn(model);
var isValid = model.Args[0].IsMember && model.Args[1].IsMember == false;
Check.Exception(!isValid, "SqlFunc.MappingColumn parameters error, The property name on the left, string value on the right");
//Check.Exception(!isValid, "SqlFunc.MappingColumn parameters error, The property name on the left, string value on the right");
this.Context.Parameters.RemoveAll(it => it.ParameterName == model.Args[1].MemberName.ObjToString());
return mappingColumnResult;
case "IsNull":