/// <summary>
        /// Gets list of addresses associated with a specific contact.
        /// </summary>
        /// <param name="contactId"></param>
        /// <returns></returns>
        private ICollection<AddressVM> GetAddresses(int contactId)
        {
            AddressVM vm = new AddressVM();
            List<Address> addresses = db.Addresses.Where(c => c.Contact.Id == contactId).ToList();
            ICollection<AddressVM> addressList = new List<AddressVM>();

            foreach (Address address in addresses)
            {
                addressList.Add(vm.addressToViewModel(address));
            }

            return addressList;
        }
        /// <summary>
        /// GET: /Address/Edit/
        /// </summary>
        /// <param name="id">Company id.</param>
        /// <param name="contactId"></param>
        /// <param name="addrId"></param>
        /// <returns></returns>
        public ActionResult Edit(int id, int contactId, int addrId)
        {
            AddressVM model = new AddressVM();
            Address address = db.Addresses.Find(addrId);
            model = model.addressToViewModel(address);
            model.AddressTypeList = db.AddressTypes;
            model.CompanyId = id;
            model.ContactId = contactId;

            if (address == null)
            {
                return HttpNotFound();
            }
            ModelState.Clear();
            return View(model);
        }