领域事件预备测试
This commit is contained in:
@@ -21,6 +21,7 @@ public abstract class Entity : IEntity<Guid>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
#region 领域事件 仅仅允许通过提供的方法进行操作
|
||||
|
||||
[JsonIgnore]
|
||||
private readonly List<DomainEvent> _domainEvents = [];
|
||||
|
||||
@@ -41,6 +42,7 @@ public abstract class Entity : IEntity<Guid>
|
||||
{
|
||||
_domainEvents.Clear();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
#region 减少实体属性,增加基类
|
||||
|
||||
Reference in New Issue
Block a user