diff --git a/FreeSql.DbContext/FreeSql.DbContext.xml b/FreeSql.DbContext/FreeSql.DbContext.xml index 8fd2938a..299c91e5 100644 --- a/FreeSql.DbContext/FreeSql.DbContext.xml +++ b/FreeSql.DbContext/FreeSql.DbContext.xml @@ -120,13 +120,6 @@ 清空状态数据 - - - 根据 lambda 条件删除数据 - - - - 添加 @@ -395,14 +388,5 @@ - - - 批量注入 Repository,可以参考代码自行调整 - - - - - - diff --git a/FreeSql/Internal/CommonProvider/InsertProvider.cs b/FreeSql/Internal/CommonProvider/InsertProvider.cs index 7780ba66..a88dbd19 100644 --- a/FreeSql/Internal/CommonProvider/InsertProvider.cs +++ b/FreeSql/Internal/CommonProvider/InsertProvider.cs @@ -501,7 +501,7 @@ namespace FreeSql.Internal.CommonProvider var colidx = 0; foreach (var col in _table.Columns.Values) { - if (col.Attribute.IsIdentity && _insertIdentity == false) continue; + if (col.Attribute.IsIdentity && _insertIdentity == false && string.IsNullOrEmpty(col.DbInsertValue)) continue; if (col.Attribute.IsIdentity == false && _ignore.ContainsKey(col.Attribute.Name)) continue; if (colidx > 0) sb.Append(", "); @@ -520,7 +520,7 @@ namespace FreeSql.Internal.CommonProvider var colidx2 = 0; foreach (var col in _table.Columns.Values) { - if (col.Attribute.IsIdentity && _insertIdentity == false) continue; + if (col.Attribute.IsIdentity && _insertIdentity == false && string.IsNullOrEmpty(col.DbInsertValue)) continue; if (col.Attribute.IsIdentity == false && _ignore.ContainsKey(col.Attribute.Name)) continue; if (colidx2 > 0) sb.Append(", ");