0
0
mirror of https://github.com/alex289/CleanArchitecture.git synced 2025-07-01 02:52:56 +00:00
CleanArchitecture/CleanArchitecture.Domain/DomainEvents/DomainEvent.cs
Alexander Konietzko 53e0966f51
Add event sourcing
2023-07-01 16:46:08 +02:00

19 lines
450 B
C#

using System;
using MediatR;
namespace CleanArchitecture.Domain.DomainEvents;
public abstract class DomainEvent : Message, INotification
{
protected DomainEvent(Guid aggregateId) : base(aggregateId)
{
Timestamp = DateTime.Now;
}
protected DomainEvent(Guid aggregateId, string? messageType) : base(aggregateId, messageType)
{
Timestamp = DateTime.Now;
}
public DateTime Timestamp { get; private set; }
}