public async Task <ActionResult <Address> > DeleteAddress(int id)
        {
            var address = await _addressesRepository.GetAddressesByIdAsync(id);

            if (address == null)
            {
                return(NotFound());
            }

            await _addressesRepository.DeleteAddressAsync(id);

            return(address);
        }
Beispiel #2
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            await _addressesRepository.DeleteAddressAsync(id);

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