public IHttpActionResult Reset() { IHttpActionResult result; if (!ModelState.IsValid) { return BadRequest(); } lock (_locker) { _todoItem = new ODataTodoItem { Id = 1, Description = "TodoItem 1" }; result = Ok("OData Todos reset"); } return result; }
// POST: odata/ODataTodos public IHttpActionResult Post(ODataTodoItem todoItem) { if (!ModelState.IsValid) { return BadRequest(ModelState); } return StatusCode(HttpStatusCode.NotImplemented); }