// GET /api/customers /1 public Customer GetCustomer(int id) { Customer customer = _repo.GetCustomerById(id); if (customer == null) { throw new HttpResponseException(HttpStatusCode.NotFound); } else { return(customer); } }
//GET: Customer by id public ActionResult Details(int id) { Customer customer = _repo.GetCustomerById(id); return(View(customer)); }