Skip to content

Instantly share code, notes, and snippets.

@AlexZeitler
Created February 16, 2012 09:10
Show Gist options
  • Save AlexZeitler/1843532 to your computer and use it in GitHub Desktop.
Save AlexZeitler/1843532 to your computer and use it in GitHub Desktop.
public class CustomersController : ApiController {
// Get /api/customers
public List<Customer> Get() {
return new List<Customer>()
{
new Customer() {Id = 1, Name = "ALFKI"},
new Customer() {Id = 2, Name = "WELLI"}
};
}
// GET /api/customers/5
public string Get(int id) {
return "value";
}
// POST /api/customers
public void Post(string value) {
}
// PUT /api/customers/5
public void Put(int id, string value) {
}
// DELETE /api/customers/5
public void Delete(int id) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment