public async Task <IActionResult> Delete(int?id)
        {
            if (id != null)
            {
                TableAddress address = await _context.PersTableAddresson.FirstOrDefaultAsync(p => p.AddressId == id);

                Tablelocality tablelocality = await _context.Tablelocality.FirstOrDefaultAsync(p => p.localityId == address.localityId);

                TableDistrict tableDistrict = await _context.TableDistrict.FirstOrDefaultAsync(p => p.DistrictId == tablelocality.DistrictId);

                if (address != null)
                {
                    _context.PersTableAddresson.Remove(address);
                    await _context.SaveChangesAsync();

                    _context.Tablelocality.Remove(tablelocality);
                    await _context.SaveChangesAsync();

                    _context.TableDistrict.Remove(tableDistrict);
                    await _context.SaveChangesAsync();

                    return(RedirectToAction("OrganizationInformation"));
                }
            }
            return(NotFound());
        }
        public async Task <IActionResult> AddAdreess(InformationAboutTheAccountViewModel model)
        {
            int TableOrganizations = _context.TableOrganizations.Include(i => i.users).FirstOrDefault
                                         (i => User.Identity.Name == i.users.UserName).TableOrganizationsId;

            TableDistrict district = new TableDistrict
            {
                NameDistrict = model.District,
                AreaId       = model.areaId
            };

            _context.TableDistrict.Add(district);
            await _context.SaveChangesAsync();

            Tablelocality tablelocality = new Tablelocality
            {
                Typelocality = model.TypesOfLocalities.ToString(),
                DistrictId   = district.DistrictId,
                Namelocality = model.Namelocality
            };

            _context.Tablelocality.Add(tablelocality);
            await _context.SaveChangesAsync();

            TableAddress address = new TableAddress
            {
                Adress               = model.Adress,
                PostalCode           = model.PostalCode,
                TableOrganizationsId = TableOrganizations,
                localityId           = tablelocality.localityId,
            };

            _context.PersTableAddresson.Add(address);
            await _context.SaveChangesAsync();

            return(RedirectToAction("OrganizationInformation"));
        }