Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ASP NET WEB API Get Customer By ID
public IHttpActionResult GetCustomer(int id)
Customer customer = db.Customers.Find(id);
if (customer == null)
return NotFound();
return Ok(customer);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment