mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-15 18:55:07 +08:00
-
This commit is contained in:
@@ -118,6 +118,16 @@ namespace SqlSugar
|
||||
private void PreToSql()
|
||||
{
|
||||
UpdateBuilder.PrimaryKeys = GetPrimaryKeys();
|
||||
|
||||
if (this.IsSingle)
|
||||
{
|
||||
foreach (var item in this.UpdateBuilder.DbColumnInfoList)
|
||||
{
|
||||
if (this.UpdateBuilder.Parameters == null) this.UpdateBuilder.Parameters = new List<SugarParameter>();
|
||||
this.UpdateBuilder.Parameters.Add(new SugarParameter(this.SqlBuilder.SqlParameterKeyWord + item.DbColumnName, item.Value));
|
||||
}
|
||||
}
|
||||
|
||||
#region Identities
|
||||
if (!IsOffIdentity)
|
||||
{
|
||||
@@ -142,14 +152,6 @@ namespace SqlSugar
|
||||
}).ToList();
|
||||
}
|
||||
#endregion
|
||||
if (this.IsSingle)
|
||||
{
|
||||
foreach (var item in this.UpdateBuilder.DbColumnInfoList)
|
||||
{
|
||||
if (this.UpdateBuilder.Parameters == null) this.UpdateBuilder.Parameters = new List<SugarParameter>();
|
||||
this.UpdateBuilder.Parameters.Add(new SugarParameter(this.SqlBuilder.SqlParameterKeyWord + item.DbColumnName, item.Value));
|
||||
}
|
||||
}
|
||||
}
|
||||
private string GetDbColumnName(string entityName)
|
||||
{
|
||||
|
Reference in New Issue
Block a user