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