Exemplo n.º 1
0
        public ActionResult DeleteAddress(int id)
        {
            var addressModelFromRepo = _repository.GetAddressById(id);

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

            _repository.DeleteAddress(addressModelFromRepo);
            _repository.SaveChanges();

            return(NoContent());
        }