public async Task <IActionResult> Edit(long id, [Bind("Id,AddressTitle,Address,City,Region,PostalCode,Country,Phone,Fax")] AddressType addressType)
        {
            if (id != addressType.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(addressType);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AddressTypeExists(addressType.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(addressType));
        }
        public async Task <IActionResult> Edit(long id, [Bind("ContactID,Title,FirstName,MiddleName,LastName,HomePhone,MobilePhone")] PersonContact personContact)
        {
            if (id != personContact.ContactID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(personContact);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PersonContactExists(personContact.ContactID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(personContact));
        }