Update SqlServer batch insert

This commit is contained in:
skx
2020-10-08 10:38:41 +08:00
parent 92d00016ff
commit 3ddb33dbb1

View File

@@ -162,7 +162,12 @@ namespace SqlSugar
pageIndex++;
batchInsetrSql.Append("\r\n;\r\n");
}
return batchInsetrSql.ToString();
var result= batchInsetrSql.ToString();
if (this.Context.CurrentConnectionConfig.DbType == DbType.SqlServer)
{
result += "select @@identity;";
}
return result;
}
}
public virtual object FormatValue(object value)