public async Task <IActionResult> Edit(int id, [Bind("PersonId,FirstName,LastName,Email,Mobile,AddressId,AddressLine,City,Pin")] PersonAddressview personAddressview)
        {
            if (id != personAddressview.PersonID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(personAddressview);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PersonAddressviewExists(personAddressview.PersonID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(personAddressview));
        }
        public async Task <IActionResult> Create([Bind("PersonId,FirstName,LastName,Email,Mobile,AddressId,AddressLine,City,Pin")] PersonAddressview personAddressview)
        {
            if (ModelState.IsValid)
            {
                _context.Add(personAddressview);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(personAddressview));
        }