mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 04:23:47 +08:00
@@ -67,6 +67,16 @@ namespace SqlSugar
|
|||||||
this.Context.MappingTables.Add(entityName, tableName);
|
this.Context.MappingTables.Add(entityName, tableName);
|
||||||
return this; ;
|
return this; ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IUpdateable<T> IgnoreColumns(bool IgnoreAllNullColumns, bool IsOffIdentity = false)
|
||||||
|
{
|
||||||
|
UpdateBuilder.IsOffIdentity = IsOffIdentity;
|
||||||
|
if (this.UpdateBuilder.LambdaExpressions == null)
|
||||||
|
this.UpdateBuilder.LambdaExpressions = InstanceFactory.GetLambdaExpressions(this.Context.CurrentConnectionConfig);
|
||||||
|
this.UpdateBuilder.IsNoUpdateNull = IgnoreAllNullColumns;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public IUpdateable<T> IgnoreColumns(Func<string, bool> ignoreColumMethod)
|
public IUpdateable<T> IgnoreColumns(Func<string, bool> ignoreColumMethod)
|
||||||
{
|
{
|
||||||
this.UpdateBuilder.DbColumnInfoList = this.UpdateBuilder.DbColumnInfoList.Where(it => !ignoreColumMethod(it.PropertyName)).ToList();
|
this.UpdateBuilder.DbColumnInfoList = this.UpdateBuilder.DbColumnInfoList.Where(it => !ignoreColumMethod(it.PropertyName)).ToList();
|
||||||
@@ -181,6 +191,7 @@ namespace SqlSugar
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete]
|
||||||
public IUpdateable<T> Where(bool isUpdateNull, bool IsOffIdentity = false)
|
public IUpdateable<T> Where(bool isUpdateNull, bool IsOffIdentity = false)
|
||||||
{
|
{
|
||||||
UpdateBuilder.IsOffIdentity = IsOffIdentity;
|
UpdateBuilder.IsOffIdentity = IsOffIdentity;
|
||||||
@@ -189,6 +200,7 @@ namespace SqlSugar
|
|||||||
this.UpdateBuilder.IsNoUpdateNull = isUpdateNull;
|
this.UpdateBuilder.IsNoUpdateNull = isUpdateNull;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IUpdateable<T> Where(Expression<Func<T, bool>> expression)
|
public IUpdateable<T> Where(Expression<Func<T, bool>> expression)
|
||||||
{
|
{
|
||||||
var expResult = UpdateBuilder.GetExpressionValue(expression, ResolveExpressType.WhereSingle);
|
var expResult = UpdateBuilder.GetExpressionValue(expression, ResolveExpressType.WhereSingle);
|
||||||
|
Reference in New Issue
Block a user