using System;
using System.Collections.Generic;
using Model;

namespace Business
{
    public class ContactException : ApplicationException
    {
        public ContactException(string message, List<Contact> contacts)
            : base(message)
        {
            this.Contacts = contacts;
        }
        public List<Contact> Contacts { get; set; }

        public List<string> NameList
        {
            get
            {
                List<string> names = new List<string>();
                foreach (Contact contact in this.Contacts)
                {
                    names.Add(contact.ContactName);
                }
                return names;
            }
        }

    }
}
