public ActionResult DeletePhone(int Id) { var phone = _repository.GetPhoneById(Id); if (phone == null) { return(NotFound()); } _repository.DeletePhone(phone); _repository.SaveChanges(); return(NoContent()); }
public ActionResult DeletePhone(int Id) { var phone = _repository.GetPhoneById(Id); if (phone == null) { return(NotFound()); } _repository.DeletePhone(phone); _repository.SaveChanges(); return(NoContent()); }