Ejemplo n.º 1
0
        public ActionResult DeletePhone(int Id)
        {
            var phone = _repository.GetPhoneById(Id);

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

            _repository.DeletePhone(phone);

            _repository.SaveChanges();

            return(NoContent());
        }