From 6cc3c1bdb5ccf2c02c3cffe1c4bf4a766fc724fa Mon Sep 17 00:00:00 2001 From: Fat Snail <147295383+Fat-Snail@users.noreply.github.com> Date: Wed, 18 Sep 2024 09:34:10 +0800 Subject: [PATCH] Update DAL.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 完善了DAL需要重置表检查的需求,适用于删表需要再次创建表的操作 --- XCode/DataAccessLayer/DAL.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/XCode/DataAccessLayer/DAL.cs b/XCode/DataAccessLayer/DAL.cs index b3bd8f18d..82daf0433 100644 --- a/XCode/DataAccessLayer/DAL.cs +++ b/XCode/DataAccessLayer/DAL.cs @@ -182,7 +182,10 @@ public static DAL Create(String connName) return dal; } - private void Reset() + /// + /// 重置Dal,注意,此操作会引起表结构重新检查,用于删除表后再次执行表检查,适用于一些删库删表需要重新建表的操作 + /// + public void Reset() { _Db.TryDispose(); @@ -885,4 +888,4 @@ public IList ModelTables set => _ModelTables = value; } #endregion -} \ No newline at end of file +}