Skip to content

Commit

Permalink
cleaning up events
Browse files Browse the repository at this point in the history
  • Loading branch information
ardalis committed Apr 27, 2021
1 parent 7bb94e0 commit 70bb0ee
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace FrontDesk.Core.Events
{
// This is fired from within the model when after an appt was confirmed
public class AppointmentConfirmedEvent : BaseDomainEvent
{
public AppointmentConfirmedEvent(Appointment appointment) : this()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public AppointmentScheduledEvent()
}

public Guid Id { get; private set; }

public Appointment AppointmentScheduled { get; private set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ public AppointmentUpdatedEvent(Appointment appointment)
public AppointmentUpdatedEvent()
{
this.Id = Guid.NewGuid();
DateTimeEventOccurred = DateTime.Now;
}

public Guid Id { get; private set; }
public DateTime DateTimeEventOccurred { get; private set; }
public Appointment AppointmentUpdated { get; private set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ namespace PluralsightDdd.SharedKernel
{
public abstract class BaseDomainEvent : INotification
{
public DateTimeOffset DateOccurred { get; protected set; } = DateTime.UtcNow;
public DateTimeOffset DateOccurred { get; protected set; } = DateTimeOffset.UtcNow;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<Summary>Includes common abstractions and base types.</Summary>
<RepositoryUrl>https://github.com/ardalis/pluralsight-ddd-fundamentals</RepositoryUrl>
<PackageTags>aspnet asp.net aspnetcore asp.net core ddd dddesign value object entity aggregate domain event pluralsight</PackageTags>
<PackageReleaseNotes>Update NuGet dependencies.</PackageReleaseNotes>
<Version>2.1.1</Version>
<PackageReleaseNotes>Update DomainEvent to use DateTimeOffset.Now.</PackageReleaseNotes>
<Version>2.1.2</Version>
<AssemblyName>PluralsightDdd.SharedKernel</AssemblyName>
<PackageIconUrl>https://user-images.githubusercontent.com/782127/33497760-facf6550-d69c-11e7-94e4-b3856da259a9.png</PackageIconUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand Down

0 comments on commit 70bb0ee

Please sign in to comment.