fix DbCurrent

This commit is contained in:
Lightczx
2023-04-07 18:44:08 +08:00
parent d5b668cb8d
commit 512b1257a8
2 changed files with 6 additions and 1 deletions

View File

@@ -42,7 +42,7 @@ internal sealed class DbCurrent<TEntity, TMessage>
set set
{ {
// prevent useless sets // prevent useless sets
if (current == value) if (current?.InnerId == value?.InnerId)
{ {
return; return;
} }

View File

@@ -12,6 +12,11 @@ namespace Snap.Hutao.Core.Database;
[HighQuality] [HighQuality]
internal interface ISelectable internal interface ISelectable
{ {
/// <summary>
/// 数据库内部Id
/// </summary>
Guid InnerId { get; }
/// <summary> /// <summary>
/// 获取或设置当前项的选中状态 /// 获取或设置当前项的选中状态
/// </summary> /// </summary>