public void SubmitEmails(List <Email> Emails, long personID)
        {
            if (Emails == null)
            {
                return;
            }
            List <Common.Models.Basic.Email> commanEmails = new List <Common.Models.Basic.Email>();

            Emails.ForEach(f => commanEmails.Add(new Common.Models.Basic.Email()
            {
                Name        = f.Name,
                EmailTypeID = f.EmailTypeID,
                PersonID    = personID
            }));
            commanEmails.ForEach(async f => await _emailController.Create(f));
        }
예제 #2
0
 private async void SubmitEmailAsync(Email email, long personID)
 {
     _emailInstance             = new Common.Models.Basic.Email();
     _emailInstance.EmailTypeID = email.EmailTypeID;
     _emailInstance.Name        = email.Name;
     _emailInstance.PersonID    = personID;
     await _emailController.Create(_emailInstance);
 }