public async Task <bool> UpdateAppointmentEmail(string id) { if (id == null) { return(false); } var currentAppointment = await dataContext.Appointments.Include(x => x.User).SingleOrDefaultAsync(x => x.Id == id); var user = currentAppointment.User; var sendUserBody = EmailGenerator.GenerateUpdateAppointmentUserEmailTemplate(user.FirstName, user.LastName, currentAppointment.Id); await emailSender.SendEmailAsync(sendUserBody, "Updated Scheduled Appointment", user.EmailAddress); return(true); }