AggregateRoot.cs 567 B

1234567891011121314151617181920212223
  1. using System.Collections.Generic;
  2. using System.Collections.ObjectModel;
  3. using System.ComponentModel.DataAnnotations.Schema;
  4. using Abp.Events.Bus;
  5. namespace Abp.Domain.Entities
  6. {
  7. public class AggregateRoot : AggregateRoot<int>, IAggregateRoot
  8. {
  9. }
  10. public class AggregateRoot<TPrimaryKey> : Entity<TPrimaryKey>, IAggregateRoot<TPrimaryKey>
  11. {
  12. [NotMapped]
  13. public virtual ICollection<IEventData> DomainEvents { get; }
  14. public AggregateRoot()
  15. {
  16. DomainEvents = new Collection<IEventData>();
  17. }
  18. }
  19. }