Synchronization code

This commit is contained in:
sunkaixuan
2024-04-22 13:00:16 +08:00
parent 8c85552a6e
commit d900bc0156

View File

@@ -66,6 +66,10 @@ namespace SqlSugar
public virtual KeyValuePair<string, List<SugarParameter>> ToSql()
{
InsertBuilder.IsReturnIdentity = true;
if (this.SqlBuilder.SqlParameterKeyWord == ":" && !this.EntityInfo.Columns.Any(it => it.IsIdentity))
{
InsertBuilder.IsReturnIdentity = false;
}
PreToSql();
AutoRemoveDataCache();
string sql = InsertBuilder.ToSqlString();