public async Task SendConfirmationEmails(SheetUpload sheetUpload) { var recipients = new List <EmailAddress>(); var tasks = new List <Task>(); foreach (Person person in sheetUpload.People) { foreach (var email in person.Emails) { await sendConfirmationEmail(email.EmailAddress, person.FirstName, person.Id); } } }
public SheetUpload toSheetUpload(IFormFile file, string userId) { if (file == null) { throw new ArgumentNullException("file", "Argument file cannot be null."); } MemoryStream memoryStream = new MemoryStream(); file.CopyTo(memoryStream); var people = convertToPersonCollection(memoryStream); SheetUpload upload = new SheetUpload(userId, file.FileName); upload.People = people; return(upload); }