Add Check

This commit is contained in:
sunkaixuan 2019-06-01 13:15:59 +08:00
parent 5065f6213e
commit a2eed35b80

View File

@ -211,6 +211,7 @@ namespace SqlSugar
return this; return this;
} }
public IInsertable<T> IgnoreColumns(bool ignoreNullColumn, bool isOffIdentity = false) { public IInsertable<T> IgnoreColumns(bool ignoreNullColumn, bool isOffIdentity = false) {
Check.Exception(this.InsertObjs.Count() > 1&& ignoreNullColumn, ErrorMessage.GetThrowMessage("ignoreNullColumn NoSupport batch insert", "ignoreNullColumn 不支持批量操作"));
this.IsOffIdentity = isOffIdentity; this.IsOffIdentity = isOffIdentity;
if (this.InsertBuilder.LambdaExpressions == null) if (this.InsertBuilder.LambdaExpressions == null)
this.InsertBuilder.LambdaExpressions = InstanceFactory.GetLambdaExpressions(this.Context.CurrentConnectionConfig); this.InsertBuilder.LambdaExpressions = InstanceFactory.GetLambdaExpressions(this.Context.CurrentConnectionConfig);