public IHttpActionResult Post(TestRESTObject input) { if(input == null) { return NotFound(); } else { GetTestResults().Add(input); return Ok(input); } }
public IHttpActionResult Put(int? id, TestRESTObject input) { if(id == null || input == null || !id.HasValue) { return NotFound(); } else { var match = GetTestResults().First(r => r.ID == id); if(match == null) { return NotFound(); } match = input; return Ok(match); } }