Do not force aggregate roots to implement IGeneratesDomainEvents.

pull/272/head
Halil İbrahim Kalkan 7 years ago
parent 08ec531e36
commit af8f5cbcb1

@ -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>();

@ -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