- 补充 ZeroDbContext.Dispose;

This commit is contained in:
2881099
2025-04-18 16:13:37 +08:00
parent 75bef60884
commit 25ecbfe06d

View File

@@ -59,13 +59,22 @@ OneToMany 级联删除
ManyToOne 忽略
ManyToMany 级联删除中间表(注意不删除外部根)
*/
public partial class ZeroDbContext
public partial class ZeroDbContext : IDisposable
{
internal IFreeSql _orm;
internal DbTransaction _transaction;
internal int _commandTimeout;
internal List<ZeroTableInfo> _tables;
public void Dispose()
{
_changeReport.Clear();
_cascadeAffrows = 0;
_cascadeAuditEntityIgnores.Clear();
_cascadeIgnores.Clear();
_states.Clear();
}
/// <summary>
/// 创建新的ZeroDbCotext实例
/// </summary>