mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-18 09:44:39 +08:00
Update Updateable
This commit is contained in:
@@ -32,6 +32,7 @@ namespace SqlSugar
|
||||
public List<string> PrimaryKeys { get; set; }
|
||||
public bool IsOffIdentity { get; set; }
|
||||
public bool IsWhereColumns { get; set; }
|
||||
public bool? IsListUpdate { get; set; }
|
||||
|
||||
public virtual string SqlTemplate
|
||||
{
|
||||
@@ -112,6 +113,7 @@ namespace SqlSugar
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public virtual ExpressionResult GetExpressionValue(Expression expression, ResolveExpressType resolveType, bool isMapping = true)
|
||||
{
|
||||
ILambdaExpressions resolveExpress = this.LambdaExpressions;
|
||||
@@ -156,7 +158,7 @@ namespace SqlSugar
|
||||
}
|
||||
var groupList = DbColumnInfoList.GroupBy(it => it.TableId).ToList();
|
||||
var isSingle = groupList.Count() == 1;
|
||||
if (isSingle)
|
||||
if (isSingle&&this.IsListUpdate==null)
|
||||
{
|
||||
return ToSingleSqlString(groupList);
|
||||
}
|
||||
|
@@ -684,7 +684,9 @@ namespace SqlSugar
|
||||
{
|
||||
UpdateObjs = new List<T>();
|
||||
}
|
||||
return Updateable(UpdateObjs.ToArray());
|
||||
var result= (UpdateableProvider<T>)Updateable(UpdateObjs.ToArray());
|
||||
result.UpdateBuilder.IsListUpdate = true;
|
||||
return result;
|
||||
}
|
||||
public virtual IUpdateable<T> Updateable<T>(T UpdateObj) where T : class, new()
|
||||
{
|
||||
|
Reference in New Issue
Block a user