public IActionResult GetFirstName(int id) { var customer = _sampleService.FindCustomer(id); if (customer == null) { return(NotFound()); } return(new ObjectResult(customer.FirstName)); }