public static async Task SendEmailsAsync() { ApplicationDbContext db = new ApplicationDbContext(); SendEmailController e1 = new SendEmailController(); var apps = db.Appointments.Where(o => o.DayofApp == DateTime.Today).ToList(); foreach (var item in apps) { string S = item.TimeStart.GetDisplayName(); string Name = item.PatientState.Patient.UserName; string Email = item.PatientState.Patient.Email; await e1.SendEmail(S, Name, Email, "1"); } }
public RenderMVCPartialsContact(SendEmailController sendEmailController) { _sendEmailController = sendEmailController; }