Insertable count=0 AddQueue BUG

This commit is contained in:
sunkaixuna
2021-05-15 22:43:57 +08:00
parent cc7cee831e
commit 3f5ce11d18

View File

@@ -34,10 +34,13 @@ namespace SqlSugar
#region Core #region Core
public void AddQueue() public void AddQueue()
{
if (this.InsertObjs!=null&&this.InsertObjs.Length > 0&& this.InsertObjs[0]!=null)
{ {
var sqlObj = this.ToSql(); var sqlObj = this.ToSql();
this.Context.Queues.Add(sqlObj.Key, sqlObj.Value); this.Context.Queues.Add(sqlObj.Key, sqlObj.Value);
} }
}
public virtual int ExecuteCommand() public virtual int ExecuteCommand()
{ {
if (this.InsertObjs.Count() == 1 && this.InsertObjs.First() == null) if (this.InsertObjs.Count() == 1 && this.InsertObjs.First() == null)