Browse Source

Do not force aggregate roots to implement IGeneratesDomainEvents.

pull/272/head
Halil İbrahim Kalkan 9 years ago
parent
commit
af8f5cbcb1
  1. 4
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/AggregateRoot.cs
  2. 2
      src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IAggregateRoot.cs

4
src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/AggregateRoot.cs

@ -5,7 +5,7 @@ using System.Collections.ObjectModel;
namespace Volo.Abp.Domain.Entities
{
[Serializable]
public abstract class AggregateRoot : Entity, IAggregateRoot
public abstract class AggregateRoot : Entity, IAggregateRoot, IGeneratesDomainEvents
{
private readonly ICollection<object> _domainEvents = new Collection<object>();
@ -26,7 +26,7 @@ namespace Volo.Abp.Domain.Entities
}
[Serializable]
public abstract class AggregateRoot<TKey> : Entity<TKey>, IAggregateRoot<TKey>
public abstract class AggregateRoot<TKey> : Entity<TKey>, IAggregateRoot<TKey>, IGeneratesDomainEvents
{
private readonly ICollection<object> _domainEvents = new Collection<object>();

2
src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IAggregateRoot.cs

@ -4,7 +4,7 @@
/// Defines an aggregate root. It's primary key may not be "Id" or it may have a composite primary key.
/// Use <see cref="IAggregateRoot{TKey}"/> where possible for better integration to repositories and other structures in the framework.
/// </summary>
public interface IAggregateRoot : IEntity, IGeneratesDomainEvents
public interface IAggregateRoot : IEntity
{
}

Loading…
Cancel
Save