Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Entities/Appointment.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using DomainEventsConsole.Events;
using DomainEventsConsole.Interfaces;
using MediatR;
using System;
using System.Collections.Generic;

Expand Down Expand Up @@ -39,15 +38,16 @@ public static Appointment Create(string emailAddress)
// mailMessage.IsBodyHtml = true;
// mailMessage.Body = body;
// client.Send(mailMessage);
Console.WriteLine("Notification email sent to {0}", emailAddress);
// Console.WriteLine("Notification email sent to {0}", emailAddress);
appointment.Events.Add(new AppointmentCreated(appointment));

// update the user interface
// pretend some code here pops up a notification in the UI
// or sends a message via Blazor
// Example:
// string message = $"User {emailAddress} created an appointment.";
// await HubContext.Clients.All.SendAsync("ReceiveMessage", message);
Console.WriteLine("User Interface informed appointment created for {0}", emailAddress);
//Console.WriteLine("User Interface informed appointment created for {0}", emailAddress);

return appointment;
}
Expand Down