修改实体
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
parent
4bf93d10b0
commit
78dbe23d0e
|
@ -23,28 +23,30 @@ namespace IRaCIS.Core.Domain.Models
|
|||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
|
||||
#region 领域事件 仅仅允许通过提供的方法进行操作
|
||||
|
||||
private readonly List<DomainEvent> _domainEvents = [];
|
||||
//[NotMapped]
|
||||
//private readonly List<DomainEvent> _domainEvents = [];
|
||||
|
||||
[NotMapped]
|
||||
public IReadOnlyCollection<DomainEvent> DomainEvents => _domainEvents.AsReadOnly();
|
||||
//[NotMapped]
|
||||
//public IReadOnlyCollection<DomainEvent> DomainEvents => _domainEvents.AsReadOnly();
|
||||
|
||||
|
||||
public void AddDomainEvent(DomainEvent domainEvent)
|
||||
{
|
||||
_domainEvents.Add(domainEvent);
|
||||
}
|
||||
//public void AddDomainEvent(DomainEvent domainEvent)
|
||||
//{
|
||||
// _domainEvents.Add(domainEvent);
|
||||
//}
|
||||
|
||||
public void RemoveDomainEvent(DomainEvent domainEvent)
|
||||
{
|
||||
_domainEvents.Remove(domainEvent);
|
||||
}
|
||||
//public void RemoveDomainEvent(DomainEvent domainEvent)
|
||||
//{
|
||||
// _domainEvents.Remove(domainEvent);
|
||||
//}
|
||||
|
||||
public void ClearDomainEvents()
|
||||
{
|
||||
_domainEvents.Clear();
|
||||
}
|
||||
//public void ClearDomainEvents()
|
||||
//{
|
||||
// _domainEvents.Clear();
|
||||
//}
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
//using System.Threading.Tasks;
|
||||
//using IRaCIS.Core.Domain.Models;
|
||||
//using MassTransit;
|
||||
|
||||
i
|
||||
//namespace IRaCIS.Core.Infra.EFCore.Interceptor
|
||||
//{
|
||||
// public class DispatchDomainEventsInterceptor(IPublishEndpoint publishEndpoint) : SaveChangesInterceptor
|
||||
|
|
Loading…
Reference in New Issue