Created
February 16, 2012 09:10
-
-
Save AlexZeitler/1843532 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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