// POST /api/<controller> public HttpResponseMessage<Todo> Post(Todo todo) { _db.Todoes.Add(todo); _db.SaveChanges(); return new HttpResponseMessage<Todo>(HttpStatusCode.Created); }
// PUT /api/<controller>/5 public HttpResponseMessage Put(Todo todo) { _db.Entry(todo).State = EntityState.Modified; _db.SaveChanges(); return new HttpResponseMessage(HttpStatusCode.NoContent); }