Skip to content

Commit

Permalink
Merge pull request ardalis#47 from snowfrogdev/main
Browse files Browse the repository at this point in the history
Refactor Schedule.AddNewAppointment to abide by the CQS principle
  • Loading branch information
ardalis authored Sep 27, 2022
2 parents 39f48a1 + 0adbac0 commit 4c9ae69
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions FrontDesk/src/FrontDesk.Core/ScheduleAggregate/Schedule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private Schedule(Guid id, int clinicId) // used by EF

public DateTimeOffsetRange DateRange { get; private set; }

public Appointment AddNewAppointment(Appointment appointment)
public void AddNewAppointment(Appointment appointment)
{
Guard.Against.Null(appointment, nameof(appointment));
Guard.Against.Default(appointment.Id, nameof(appointment.Id));
Expand All @@ -43,8 +43,6 @@ public Appointment AddNewAppointment(Appointment appointment)

var appointmentScheduledEvent = new AppointmentScheduledEvent(appointment);
Events.Add(appointmentScheduledEvent);

return appointment;
}

public void DeleteAppointment(Appointment appointment)
Expand Down

0 comments on commit 4c9ae69

Please sign in to comment.