private EmailAddresses getEmails(SqlDataReader reader, int count, List<string> mappings) { EmailAddresses addresses = new EmailAddresses(); for (int i = 0; i < count; i++) { try { EmailAddressModel email = new EmailAddressModel(); email.EmailAddress = reader[mappings[i]].ToString(); email.EmailType = i + 1; addresses.EmailAddress.Add(email); } catch (Exception ex) { throw new WebFaultException<string>(string.Format("Column <{0}> not found in query results: {1}", mappings[i], ex.Message), HttpStatusCode.InternalServerError); } } return addresses; }
public EmailAddressModel(EmailAddressModel eam) { EmailAddress = eam.EmailAddress; EmailType = eam.EmailType; }
public EmailAddressModel(EmailAddressModel eam) { EmailAddress = eam.EmailAddress; EmailType = eam.EmailType; }